Select Git revision
-
Henrik (Grubba) Grubbström authored
The third argument to program_magic_identifier() should now be -1 when no inherit has been specified (0 is now reserved for referring to the current inherit). This is also reflected in the F_THIS node. The F_THIS opcode is now used exclusively to refer to specific inherits. Use the F_THIS_OBJECT opcode to refer to the current object. Rev: src/docode.c:1.201 Rev: src/interpret_functions.h:1.204 Rev: src/language.yacc:1.426 Rev: src/las.c:1.415 Rev: src/peep.in:1.83 Rev: src/program.c:1.710
Henrik (Grubba) Grubbström authoredThe third argument to program_magic_identifier() should now be -1 when no inherit has been specified (0 is now reserved for referring to the current inherit). This is also reflected in the F_THIS node. The F_THIS opcode is now used exclusively to refer to specific inherits. Use the F_THIS_OBJECT opcode to refer to the current object. Rev: src/docode.c:1.201 Rev: src/interpret_functions.h:1.204 Rev: src/language.yacc:1.426 Rev: src/las.c:1.415 Rev: src/peep.in:1.83 Rev: src/program.c:1.710
float 947 B
NAME
float - floating point numbers
SYNTAX EXAMPLE
0.9
1.0
2.7e7
DESCRIPTION
This type stores a floating point number, normally it use 4 bytes
of storage when used in a global variable.
A list of operators that applies to floats follows:
In this list a and b is used to represent a float expression:
a + b summation
a - b subtraction
a * b multiplication
a / b division
a % b modulo ( same thing as a - floor( a / b ) * b )
- a negation
a == b return 1 if a is equal to b, 0 otherwise
a != b return 0 if a is equal to b, 1 otherwise
a < b returns 1 if a is lesser than b, 0 otherwise
a <= b returns 1 if a is lesser or equal to b, 0 otherwise
a > b returns 1 if a is greater than b, 0 otherwise
a >= b returns 1 if a is greater or equal to b, 0 otherwise
NOTA BENE
floats and ints cannot be used together, they have to be cast
to the same type first.
KEYWORDS
types
SEE ALSO
math/sin, math/cos, math/tan, math/sqrt