SPC  Version 0.9.5
 All Files Functions Groups Pages

SPC supports user-defined aggregate types known as structs.

These are declared very much like you declare structs in a C program.

struct car
int car_type;
int manu_year;
struct person
int age;
car vehicle;
person myPerson;

After you have defined the structure type you can use the new type to declare a variable or nested within another structure type declaration. Members (or fields) within the struct are accessed using a dot notation.

myPerson.age = 40;
anotherPerson = myPerson;
fooBar.car_type = honda;
fooBar.manu_year = anotherPerson.age;

You can assign structs of the same type but the compiler will complain if the types do not match.