Why does this not go?
Code: Select all
#macro machwas(DTYPE, D)
#if typeof(DTYPE) = typeof(single)
cast(single, D)
#endif
#endmacro
dim as double cr = 0.0045
dim as single e
e = machwas(single, cr)
Schrubber
Code: Select all
#macro machwas(DTYPE, D)
#if typeof(DTYPE) = typeof(single)
cast(single, D)
#endif
#endmacro
dim as double cr = 0.0045
dim as single e
e = machwas(single, cr)
Code: Select all
e = cast(single, cr)
Code: Select all
#macro machwas(DTYPE, D)
#if typeof(DTYPE) = typeof(DOUBLE)
iif(abs(cast(DTYPE, iif(cast(DTYPE, D) >= 0, cast(DTYPE, D), cast(DTYPE, -D)))) <= 0.000000000001, true, false)
#elseif typeof(DTYPE) = typeof(SINGLE)
iif(abs(cast(DTYPE, iif(cast(DTYPE, D) >= 0, cast(DTYPE, D), cast(DTYPE, -D)))) <= 0.00001f, true, false)
#endif
#endmacro
Code: Select all
e =
#if typeof(single) = typeof(single)
cast(single, D)
#endif
Code: Select all
#macro machwas(e, DTYPE, D)
#if typeof(DTYPE) = typeof(single)
e = cast(single, D)
#endif
#endmacro
dim as double cr = 0.0045
dim as single e
machwas(e, single, cr)