Difference between revisions of "Manual:DIL Manual/integerlist"
Jump to navigation
Jump to search
| Line 1: | Line 1: | ||
==Intlist== | ==Intlist== | ||
| − | + | Intlists are an array of integer types. They can be set directly as follows: | |
===Example=== | ===Example=== | ||
| Line 14: | Line 14: | ||
The intlists are saved on savable units. | The intlists are saved on savable units. | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
===Example=== | ===Example=== | ||
Revision as of 10:45, 29 November 2025
Intlist
Intlists are an array of integer types. They can be set directly as follows:
Example
wpn:={5,3,6,9,3,9};
The intlists can be accessed in the same way stringlist are accessed as follows.
Example
if (wpn.[5]==5)
{
do something
}
The intlists are saved on savable units.
Example
Setting an intlist
myintlist:={1,5,9,2,8,5};
myintlist.[4]:=50;
If you set a index that is higher then the highest index you'll get an OOB error.
Example
Using intlists
if (myintlist.[5]==5){
stuff
}
if (myintlist<myint){
stuff
}
i:=0;
ln:=length(myintlist);
while (i<ln) {
myintlist.[i]:=i;
i:=i+1;
}