FRAME SPACE
Each local is stored in a space that is named the frame space.
When you have 2 local integers and a string with a length of 10, you
need a frame size of (2*2) + 11 = 15 bytes.
The internal conversion routines used when you use INPUT
num,STR(),VAL() etc, also use the frame. They need a maximum of 16
bytes. So for this example 15+16 = 31 would be a good value.
When ever you use a num<>string conversion routine like:
Print b (where b is a variable)
Bytes will use 4 bytes max (123+0)
Integer will use 7 bytes max (-12345+0)c
Longs will use 16 bytes max
And the single will use 24 bytes max
When you add strings and use the original the value must be remembered by the compiler.
Consider this :
s$ = "abcd" + s$
Here you give s$ a new value. But you append the original value so the original value must
be remembered until the operation has completed. This copy is stored in the frame too.
So when string s$ was dimmed with a length of 20, you need a frame space of 20+1(null
byte)
When you pass a variable by VALUE (BYVAL) then you actually pass a copy of the variable.
When you pass a byte, 1 byte of frame space is used, a long will take 4 bytes.
When you use a LOCAL LONG, you also need 4 bytes of frame space to store the local long.
Lesezeichen