Download User`s Manual - TTC Technologies
Transcript
Appendix A. iSCRIPT Language Reference A.1. Variables and Expressions In stand-alone scripts, variables are declared as follows: var1, var2 as type var1, var2 – variable names satisfying the variable naming convention. as – declaration keyword type – may take values: logical, short, long, real, and double A.1.1. Types of Variables Logical variables Logical variables take on values of T or F. In addition, values of 0 or any real number may be assigned to logical variables. A numeric value of 0 will be converted to F prior to assignment, while other numbers will be converted to T. Short variables Short variables have values in the range -32,768 to 32,767. They are also type INTEGER(2) in FORTRAN. The syntax for the declaration also allows the use of INTEGER(2) or INTEGER*2 keywords. Long variables Long variables have values in the range -2,147,483,648 to 2,147,483,647. They are also type INTEGER in FORTRAN. The syntax for the declaration also allows the use of INTEGER, INTEGER(4) or INTEGER*4 keywords. Real variables Holds signed IEEE 32-bit (4-byte) single-precision floating-point numbers ranging in value from -3.4028235E+38 through -1.401298E-45 for negative values and from 1.401298E-45 through 3.4028235E+38 for positive values. The syntax for the declaration also allows the use of SINGLE, REAL(4), or REAL*4 keywords. Double variables Holds signed IEEE 64-bit (8-byte) double-precision floating-point numbers ranging in value from -1.79769313486231570E+308 through -4.94065645841246544E-324 for negative values and from 4.94065645841246544E-324 through 1.79769313486231570E+308 for positive values. The syntax for the declaration also allows the use of REAL(8) or REAL*8 keywords. 74