rgarnett1955 Active Member Licensed User Longtime User Mar 24, 2022 #1 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
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
Erel B4X founder Staff member Licensed User Longtime User Mar 24, 2022 #2 No and it is not relevant. If you are worried about performance then it is not relevant to the execution speed. Upvote 0
No and it is not relevant. If you are worried about performance then it is not relevant to the execution speed.