-
Notifications
You must be signed in to change notification settings - Fork 0
Structs
Michał edited this page Jan 8, 2023
·
3 revisions
In IterkoczeScript you can define a struct. To do so, use def struct {NameOfTheStruct}
followed by a block of code containing all the member variables.
See the example.
To use a struct you need to create an instance of it first. To do so, use the new
keyword, followed by the struct type and your own name. Like this: new Person P1
To access the member variables, use the custom defined struct variable followed by a :
and the member variable name. Like this: P1:Name