worked on function call return type check and started checking return type

This commit is contained in:
Annie
2025-04-15 00:53:03 -04:00
parent 06db190428
commit 2b1557b52c
5 changed files with 150 additions and 17 deletions

View 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;
}

View 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(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;
}