TABLE OF CONTENTS


::pwtk::phi::input_

USAGE

   There are three possible forms:

     1. input_ titleLine INPUTPHnamelist affixCards
     2. input_ INPUTPHnamelist affixCards
     3. input_ INPUTPHnamelist 

DESCRIPTION

The actual implementation of INPUTPH command. Set either (1) the whole ph.x input, or (2) only the INPUTPH and the cards that follow the namelist, or (3) solely the INPUTPH namelist, depending on the number of supplied arguments.

SOURCE

proc ::pwtk::phi::input_ {args} {
    
    set nargs [llength $args] 
    
    if { $nargs == 3} {
        
        ::pwtk::input::card INPUTPH.titleLine [lindex $args 0]
        ::pwtk::input::namelist.affix INPUTPH {*}[lrange $args 1 2]
        
    } elseif { $nargs == 2 || $nargs == 1 } {
        
        ::pwtk::input::namelist.affix INPUTPH {*}$args
        
    } else {
        # wrong usage:
        ::pwtk::error "wrong usage of INPUTPH command. Must be one of the following form:\n\n   1. input_ titleLine INPUTPHnamelist affixCards\n\n   2. input_ INPUTPHnamelist affixCards\n\n   3. input_ INPUTPHnamelist\n\nbut got:\n[list INPUTPH $args]" 1
    }
}