Set number

Purpose: Set value of a number variable.

 set-number <var> [ = <number> ]  [ process-scope ]

Number variable <var> is either assigned value <number> with "=" clause, or it is assigned 0 if equal clause ("=") is omitted.

If "process-scope" clause is used, then number is of process scope, meaning its value will persist from one request to another for the life of the process.
Examples
Initialize number "my_num" to 0 and the value of this variable, however it changes, will persist through any number of requests in the same process:
 set-number my_num process-scope

Initialize number "my_num" to 10:
 set-number my_num = 10

Subtract 5:
 set-number my_num = my_num-5

Assign an expression:
 set-number my_num = (some_num*3+1)%5

See also
Numbers
number-expressions  
number-string  
set-number  
string-number  
See all
documentation


Copyright (c) 2019-2024 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.