PRODUCT |

|

|
|
|

|
|
|
|
|
|
|
|
|
FAQ |
|
|

|
|
|
|
|
|
|
|
|
|
LEARN SCRIPTING |
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SAMPLE SCRIPTS |
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HELP / DOCUMENTATION |
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
Help Page - constant
( Some help pages may not display correctly in html because those help pages may have sample code in them, part of which may be mis-interpreted as html tags.
All help pages, including this help page, are available in biterScripting with the help command. )
|
|
|
System Feature
constant
Purpose
Explicit specification of constant of a data type
Syntax
Constants are declared and used within
expressions and throughout a script.
There is no explicit declaration.
Description
The following types of constants are supported.
real Number, optionally containing a fraction.
int Number not containing a fraction.
str String of characters.
bool Boolean or a switch value, which can be
either true or false.
int constants contain a an optional
+ or - sign followed by digits 0 through 9.
real constants contain an optional + or - sign
followed by digits 0 through 9, followed
by decimal point (.), optionally followed
by digits 0 through 9.
str constants is any text enclosed in double
quotes. The text may include escape characters.
(See escape).
bool constants are limited to two values - true and false.
when it is unclear what the type of the constant
is, the constant is assumed to be of type of
lowest operability. See examples below.
The following shows the operability order.
real <----------- Highest operability
int
str
bool <----------- Lowest operability
The lowest operability is assumed since they
can always be automatically converted to higher
operability types. See help pages on conversion
and make.
Restrictions
Escape characters are allowed only within
str constants and str variables.
Valid Examples
var int i
...
if ( $i < 9 )
...
9 is assumed to be an int constant.
var real x
...
if ( $x < 9 )
...
9 is assumed to be an int constant, but
is converted to real during comparison,
since variable x if of type real.
Invalid Examples
str customer_location
...
if ( $s == Europe )
...
Will produce error. Double quotes are needed.
The following will work.
if ( $s == "Europe" )
...
See Also
conversion
make
var
escape
|
|
|
© 2008-2010, biterScripting.com. All rights reserved.
biterScripting, biterScript, biterBrowser, biterScripting.com, FVA (Forward Variable Assignment) are trademarks of biterScripting.com. Is it biterScripting-compatible ? is a service mark of biterScripting.com.
Explorer, Unix, Windows are trademarks, service marks or other forms of intellectual property of their respective owners.
|
|