saving a double to a file as 4 characters?
ok i have a script for an interpreted language that i use to change large numbers into only 4 bytes inside a file. this is the script:
the problem is the ds_stack, i don't know how i can mock that in c++. I know c++ you can make stacks, but i'm just wondering is there a way to get around it. i don't know how to use a c++ stack very well yet so... any help would be appreciated.
var value, byte, stack, MASK, i, numBytes;
MASK = 255;
value = argument0;
stack = argument1;
numBytes = argument2;
//Push the low-order byte on the stack, moving other bytes lower.
for (i = 0; i < numBytes; i += 1)
byte = MASK & value;
value = value >> 8;