Data Section
The data section is located at the first portion of the virtual address space within the GPC bytecode and contains static values which cannot be altered during run time.
The main purpose for the data section is to store static information and the size of it is determined by the values within it. The static values can be accessed in a GPC through the use of an indexer and definitions can also be used if they are placed before the data section, as shown below.
1
define myValue = 255;
2
3
//Index No. 0 1 2 3 4 5 6 7 8 9 10
4
data ( 20, 42, 35, myValue, 1, 100, 0, 86, 255, 11, 2 );
5
6
int a, b, c;
7
8
main {
9
a = dbyte(3); //a = 255
10
b = dchar(3); //b = -1;
11
c = dword(3); //c = 511;
12
}
Copied!

Functions

The values placed within the data section are expressed in bytes (8 bit unsigned integer). The index is zero based. As you can see above, the first value is index point 0 (zero) and the 11th value would be index point 10.
dbyte
dchar
dword

dbyte Function

1
a = dbyte(3); // a = 255
Copied!
This function returns a byte value (8 bit unsigned integer) from the selected index within the array.
Syntax
dbyte ( <index>);
Parameters
<index> : The index of an element with the data section

dchar Function

1
b = dchar(3); // b = -1;
Copied!
This function returns a char value (8 bit signed integer) from the selected index within the array.
Syntax
dchar ( <index>);
Parameters
<index> : The index of an element with the data section

dword Function

1
c = dword(3); // c = 511;
Copied!
This function returns a word value (16 bit signed integer) from the selected index within the array.
Syntax
dword ( <index>);
Parameters
<index> : The index of an element with the data section
Last modified 1yr ago
Copy link
Contents
Functions