4.5.67. besGETLONGVALUE(x)

[<<<] [>>>]

Use this macro to get the long value of a variable. This macro is not the same as LONGVALUE. The macro LONGVALUE simply accesses the long value of a variable and thus can also be used as a left value assigning value to. On the other hand besGETLONGVALUE is a function call that returns a long value when the argumentum variable is NULL, double, string or some other value. In such situation using LONGVALUE would be erroneous.

The macro LONGVALUE should be used to access the long value of a variable that is known to hold a long value or when the long value of a variable is to be set.

The macro besGETLONGVALUE has to be used in a situation when we want to use a variable for its value being long. It is faster and consumes less memory than converting the variable to long allocating a new mortal just to access the long value of the new mortal using LONGVALUE.

The same statements hold for DOUBLEVALUE and besGETDOUBLEVALUE.


[<<<] [>>>]