Klik op het logo voor hulp op afstand
  
 
 
 
 
 
 
 




Operators


 
JoPPS-Script provides all standard operators that you would expect in a development environment:
 
Arithmetic operators
Example (b := 10, c := 3)
+
addition
a := b + c
13
-
subtraction
a := b - c
7
*
multiplication
a := b * c
30
/
division
a := b / c
3.33333333333333
//
integer division (DIV)
a := b // c
3
\
modulo
a := b \ c
1
\\
integer modulo
a := b \\ c
1
**
power
a := b ** c
1000
&&
logical and
a := b && c
TRUE
&
bitwise and
a := b & c
2
||
logical or
a := b || c
TRUE
|
bitwise or
a := b | c
11
^^
logical xor
a := b ^^ c
FALSE
^
bitwise xor
a := b ^ c
9
=
equality
a := b = c
FALSE
<> or !=
inequality
a := b <> c
TRUE
!
logical negation
a := !(b = c)
TRUE
~
bitwise negation
a := ~(b = c)
-1     
>
greater than
a := b > c
TRUE
<
less than
a := b < c
FALSE
<=
less than or equal to
a := b <= c
FALSE
>=
greater than or equal to
a := b >= c
TRUE
String operators
Example (e := "JoPPS-Script is ", f :="great")
+
concatenation
d := e + f
"JoPPS-Script is great"
=
equality
d := e = f
FALSE
<>or !=
negation
d := e <> f
TRUE
>
greater than
d := e > f
FALSE
<
less than
d := e < f
TRUE
<=
less than or equal to
d := e <= f
TRUE
>=
greater than or equal to
d := e >= f
FALSE
 
 
Binary operators operate on two operands, unary operators operate on only one operand.
  1. The + and - operators can be used as binary or as unary operator.
  2. The ! (negation) and the ~ (bitwise negation) operator are strict unary operators.
Bitwise operations are always performed 32-bit, results are threated as signed 32-bit integers.
 
 
Predefined language constants
 
You can use the following constants in expressions in JoPPS, JScripter or JCALL :
 

Constant
Value
TRUE
1 or logical true, note that all numeric values <> 0 are actually TRUE
FALSE
0 or logical false
CRLF
String representing a CR/LF pair. (ascii characters 13 and 10)
Can be used to write textlines to a DOS ascii file.
NIL
Represents the value of a non-allocated object variable.

 

Note: constants specific to JoPPS itself are discussed in section Function reference.

 

 




 |  History  |
 
 

 
 
 
TECHWIN SOFTWARE
De Regenboog 11
B-2800 Mechelen
T +32(0)15 44 64 64
T +31(0)30 899 32 15 Nederland