worked on function call return type check and started checking return type
This commit is contained in:
16
tests/sprint2/test/sp2_sp2_arrayargs.alpha
Normal file
16
tests/sprint2/test/sp2_sp2_arrayargs.alpha
Normal file
@ -0,0 +1,16 @@
|
||||
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(many_names);
|
||||
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;
|
||||
}
|
Reference in New Issue
Block a user