StaticsTest overwrites static variables

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

StaticsTest overwrites static variables

pikachu
Hi,

I have a comparison failure on the StaticsTest, and I know it is due to overwriting the static variables.

However, there are only two static variables used in this code, namely static 0 and static 1.  And the VM Emulator creates four.  Are static variables supposed to be the same for all functions, or are they unique for each function?

Pikachu
Reply | Threaded
Open this post in threaded view
|

Re: StaticsTest overwrites static variables

cadet1620
Administrator
pikachu wrote
I have a comparison failure on the StaticsTest, and I know it is due to overwriting the static variables.

However, there are only two static variables used in this code, namely static 0 and static 1.  And the VM Emulator creates four.  Are static variables supposed to be the same for all functions, or are they unique for each function?
Static variables are unique for each .vm source file. All functions within a single .vm file share the same static variables.

--Mark