Set double

Purpose: Set value of a double (floating point) variable.

set-double <variable> [ = <double> ]  [ process-scope ]

Double variable <variable> is either assigned value <double> with "=" clause, or it is assigned 0.0 if equal clause ("=") is omitted. A number is a signed 64-bit floating point value (double precision) with a range of approximately +/- 1.7*10E-308 to 1.7*10E308.

If "process-scope" clause is used, then double is of process scope, meaning its value will persist from one request to another for the life of the proces; in the statement where <variable> is created, the assignment will take place only once. This clause can only be used if <variable> did not already exist.
Examples
Initialize double "my_dbl" to 0.0 and the value of this variable, however it changes, will persist through any number of requests in the same process:
set-double my_dbl process-scope

Initialize number "my_dbl" to 101.34:
set-number my_dbl = 101.34

Subtract 5:
set-double my_dbl = my_dbl-5

Assign an expression:
set-double my_dbl = (some_dbl*3.4+1)/5

See also
Doubles
abs-double  
double-expressions  
double-string  
mixing-doubles-and-numbers  
set-double  
string-double  
See all
documentation


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