[Oberon] open array usage

spir denis.spir at gmail.com
Sat Jul 10 17:40:03 MEST 2010


Hello,


Sorry for coming back to the topic, but I still cannot figure out how open arrays are supposed to be used in Oberon, without any form of literal notation.

PROCEDURE Sum(reals:ARRAY OF REAL) : REAL ;
PROCEDURE Max(reals:ARRAY OF REAL) : REAL ;
How can one pass [1,2,3] or [a,b,c] to one of those procedures?

TYPE STRING = POINTER TO ARRAY OF CHAR ;
PROCEDURE concat(ARRAY OF STRING) : STRING ;
PROCEDURE write(ARRAY OF STRING) ;

How can one concat or write ["Hello, ", name, ", how do you do?"]?

Is there an answer?
If not, how to achieve that, or anyhow work around the issue?

Side-question: how to define an Oberon equivalent to Pascal's write?


Denis

________________________________

vit esse estrany ☣

spir.wikidot.com


More information about the Oberon mailing list