[ int-constant | real-constant | logical-constant | string-constant | iarray-constant | rarray-constant | sarray-constant ]
The values of most of the ICM-shell objects may also be represented explicitly in the ICM-shell as so called "constants" (i.e. in themyFactors={1.2, -4., 5.88} line,
myFactors is an ICM-shell variable of the rarray type, while {1.2, -4., 5.88}
is an "rarray" constant. The following constants are defined in the ICM-shell:
-
integers:
-9999 12 -
reals:
12.0 -0.00003 2. -
logicals:
yes no -
strings:
"I see M", "Backslash (\\) and quote (\")" "line1\nline2"or
Escape sequences which can be used inside strings:## newlines are allowed between triple quotes, e.g. a = """ A text with lines is also a string """\a - bell \b - backspace \f - formfeed \n - newline \r - carriage return \t - horizontal tab \v - vertical tab \\ - backslash \" - double quote -
integer arrays:
{2, -1, 6, 0} {-8, -1, 2}The comma is compulsory before a negative number, it can be skipped otherwise. -
real array:
{ -1.6 , 2.150 3., -160.}Real arrays can also contain "ND" (Not Defined) and other special values. The following special values:ND(not defined)- >r_value
- <r_value
INF: infinity- -INF : infinity
Torealfunction:
Optionread table csv "x_with_spec_values.csv" name="t" t.A == Toreal({"ND"})numberinread tablecsvwill convert empty fields intoNDHowever not all functions support them, be careful. Example:show Toreal({"ND"} # # here we are changing 0. values to NDs group table t {1. 0. 2. 0.} idx = Index( t.A == 0.0 ) t.A[ idx ] = Toreal( Sarray( Nof(idx), "ND" ) ) -
string arrays:
{"do","re","mi","fa","sol"} {"\n(newline), \t (tab)","\a (bell)"} - selections (find a detailed description below):
a_hiv?. a_1,2. a_*. # objects
a_h*.a a_m1 a_*.!w2,w15,z* # molecules
a_1.*/2:15,18:26 a_/18,his* # residues
a_//ca,c,n a_1.c a_/2:4/!h* # atoms
v_//phi,psi V_2//?vt* # variables