But, there is no generic type for floating variables. I imagine a new type, in example, named REAL which is 32-bits range on X86 (like FLOAT) and 64-bits range on X64 (like DOUBLE).
Here is a compiler directive demo code :
Code: Select all
CompilerIf SizeOf(INTEGER) = 4
Macro REAL
FLOAT
EndMacro
Macro R
F
EndMacro
CompilerElse
Macro REAL
DOUBLE
EndMacro
Macro R
D
EndMacro
CompilerEndIf
Code: Select all
Debug SizeOf(REAL)
Define *A.REAL = AllocateStructure(REAL)
*A\R = 5.5
Define.R B = 6.7