Files
compiler-the-translators/tests/sprint2/test/sp2_sp2_arrayargs.alpha~

16 lines
584 B
Plaintext

type string: 1 -> character
type a_of_s: 1 -> string
(* maybe some other type definitions *)
entry(arg) := {
[ string: one_name; string: another_name; a_of_s: many_names ]
another_name := reserve another_name(4); (* reserve space for an an array of character, with 4 members *)
many_names := reserve a_of_s(3);
many_names(0) := one_name;
many_names(1) := another_name;
many_names(2) := reserve a_of_s(2)(6); (* reserve space for an item of the same type as a_of_s(2), an array of character, with 6 members *)
many_names(2)(0) := "P";
return 0;
}