Name of variable
- cannot be longer than 32 characters length,
- can cannot start with a digit,
- can have any characters except: ASCII characters 32, 9, 13, 10,
- dollar character "$" make name variable which explained below.
Variables can be used in operations and string-expressions.
All variables have type "string".
In other words, values of variables are strings of ASCII characters.
However, if used in arithmetical operations, they
interpreted as long integers (, or in case of division "\", as double rationals )
If value was not assigned to variable, variable has initial value empty "".
If empty variable used in arithmetical operations, this variable is assigned value 0.
Variable names allowed:
example: if variable $moo has value foo, and
variable $boo has value "_own_$moo"
then
$moo - will refer to name "foo",
my$moo - will refer to name "myfoo",
my$boo - will refer to name "my_own_foo"
Variables can be included in string-expressions with format
$<variable_name><limitor>
<limitor> is one of " ", CR, LF, TAB, double qoutes ", or simply end of string;
" " - is sacrificed (removed when substituting variable);
other limitors - are not;
There are 25 intrinsic (reserved variable) names:
=================================================
with their name, initial values, and description:
token "" current token
type "" current event type
indent INDENT
(after assigning v=indent, INDENT becomes empty)
explained in indent_help.txt.
in "" SourceText;
assignment ..=in."text" automatically assigns pos = 1;
out "" ResultText
pos 1 current position in SourceText during execution;
p_round round number useful for projects which
parse source multiple times
@ NestVariable; Assosiated with each global nest position.
# current position in the global nest (=global nest length); read-only;
value is a number;
@state current state; value is a string;
@nest current nest; value is a string;
p_file_for_GUI name of currently processed file to be
displayed in GUI box;
p_source source project
p_version S2S version
This variables explained in file:
project_and_schema_structure_help.txt/"File Tree Structure"
p_basic source file basic name
p_extension source file extension
p_rbasic result file basic name
p_rextension result file extension
p_local_path relative path to parent folder of currently processed file
"relative" means relative to parent of source
p_umbrella
p_shield
p_parent
p_rparent
p_processed_files
p_file
p_rfile
Some file-system variables described in: project_and_schema_structure_help.
Additional information is in: arithmetical_commands_and_assigments_help.txt