Variables
Variables
Variable names can only have "a-z", "0-9"
and "_" in them. Variables can be inserted anywhere in the script,
FAST-TCF will replace any variables with their corresponding values before processing
the line, for example:
define var output displacement
define var nod_id 12345678
define var xscale 0.001
node $nod_id $output x xscale $xscale
converts into:
node 12345678 displacement x xscale 0.001
Variable definitions can contain several words or other varaibles,
and these will be joined together to form the final variable value, for example:
define var day 31st
define var month january
define var year 2099
define var date $day _ $month _ $year
creates the variable date with value 31st_january_2099
Because variables cannot have anything other than "a-z",
"0-9" and "_" in them, it is possible to use variables within
strings:
define var analysis run01_vers2
read january_$analysis.cur
converts into
read january_run01_vers2.cur
However, sometimes the user may want to insert a variable within
other alphanumeric words, in these circumstances use a
"$$"
terminator to designate the end of the variable name:
define var analysis xyz_run01
read $analysis$$_x.cur
converts into
read xyz_run01_x.cur
There are several built in variables, and these depend on the
system and command line used to run FAST-TCF, they can be checked on the dialogue
T/HIS prints before starting:
| $run_name | This is the basename of the key file in for the 1st model directory (should there be one). If a script refers to multiple models then $run_name N (where N is the model number) can be used for each model. |
| $run_dir | This is the full pathname of the directory containing the output files for a model. If a script refers to multiple models then $run_dir N (where N is the model number) can be used for each model. |
| $run_title | This is the title of the analysis found in the output files. If a script refers to multiple models then $run_title N (where N is the model number) can be used for each model. |
| $ftcf_script | This is the name of the FAST-TCF that is being run |
| $ftcf_script_dir | This is the name of the directory containing the FAST-TCF that is being run |
| $ftcf_dir | This is the name of the current working directory. |
| $ftcf_path | This is the full pathname of the current working directory. |
| $ftcf_startin_dir | This is the full pathname of the directory that T/HIS was started in. |
|
FASTTCF called |
|