Page 1 of 1
Can someone explain this syntax please?
Posted: Tue Aug 05, 2003 11:14 pm
by Kale
I saw some wierd syntax in the Tsunami Record Manager thread: (
viewtopic.php?t=4918) and wondered if someone could explain it to me please.
Code: Select all
SehName.b[25]
KeyLen.b[6]
KeyLen1.b[43]
Notice the
square brackets at the end of the byte variables, what is the function of these? i couldn't seem to find anything about them in the PB Docs.

Posted: Wed Aug 06, 2003 12:35 am
by freedimension
Those SquareBrackets are almost surely to be found in Structures, am I right?
Now, they indicate an static Array, since in Structures there mustn't be an dynamic Array. This is so, because Structures need a fixed size.
Posted: Wed Aug 06, 2003 12:57 am
by Karbon
Looks like square brackets are used in static arrays..
Posted: Wed Aug 06, 2003 11:18 am
by Kale
Dim StaticArray.b(10) <--- This is the correct syntax for static arrays isn't it?
StaticArray.b[10] <--- This is different isn't it?
Posted: Wed Aug 06, 2003 11:45 am
by Saboteur
Kale wrote:Dim StaticArray.b(10) <--- This is the correct syntax for static arrays isn't it?
StaticArray.b[10] <--- This is different isn't it?
Dim StaticArray.b(10) is dynamic array, and globally accessable. It can change the size (with dim again)
StaticArray.b[10] is static array, and only usefull in structures. It can't change its size.
Anyway, both works same way.
Posted: Wed Aug 06, 2003 12:21 pm
by Kale
ah... i see

thanks!
Posted: Wed Aug 06, 2003 2:03 pm
by newbie
thanks too, i know now why such
"Global Dim Array()" didn't works
