B4J Question Do Expressions of constants get resolved at compile time?

rgarnett1955

Active Member
Licensed User
Longtime User
Hi,

If I have the following code:

Constant Values:
    Dim const floatsNoBytes        = 4 As Int
    Dim const noFloatsOrDoubles = 5 As Int
    
    packetPtr = packetPtr + noFloatsOrDoubles * floatsNoBytes

I am guessing that the noFloatsOrDoubles * floatsNoBytes is resolved at compile time so that the expression for the packetPtr becomes:

New Expression:
packetPtr = packetPtr + CALCULATED_CONSTANT

And this expression is executed at run time?

Is this correct?

Regards
Rob
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…