|
or
- logical or
| Syntax: |
float
or(float x, float y)
x or y |
| Description: |
Returns
a logical or on the corresponding elements of x and
y.
An expression is true if it is non-zero |
| Examples: |
x
|
y
|
or(x,y) |
x
or y |
true
false
true
false |
true
true
false
false |
true
true
true
false |
| Code
sample: |
height = rnd(100)*2;
weight = rnd(100)*200;
tall = (height>1.5);
heavy = (weight>100);
tallOrHeavy = or(tall, heavy);
tallOrHeavy2 = tall or heavy; #the same result
|
| See
also: |
if,
mask, not,
and |
os_type
- return OS type
| Syntax: |
string
os_type() |
| Description: |
Return
type of OS. Possible values include:
This function
can be used to include platform specific code in your GSL script.
|
| Code
sample 1: |
if (os_type()="UNIX") then
WORK.HomeDir = "/usr/local/MYAPP/";
elif (os_type()="Windows") then
WORK.HomeDir = "c:\\Program Files\\MYAPP\\";
else
WORK.HomeDir = "user1:[apps.MYAPP]";
endif
|
| See
also: |
system |
.
|