[Oberon] Printing an array
martinbishop at bellsouth.net
Tue Oct 7 22:05:59 MEST 2008
This is probably a silly question, but how can I create a function to
print an array?
Obviously I'd use a FOR loop over the elements, but when I try to use
VAR a: ARRAY 10 OF INTEGER;
PROCEDURE PrintArray(VAR a: ARRAY OF INTEGER);
VAR i: INTEGER;
FOR i := 0 TO LEN(a) - 1 DO
I get the error:
/home/martin/code/Oberon/Bogo.Mod:32:30: Expression not compatible with
variable type `INTEGER'
Which I assume means LEN can't get the length of a?
More information about the Oberon