[Oberon] open array usage
Douglas G. Danforth
danforth at greenwoodfarm.com
Sat Jul 10 23:03:54 MEST 2010
spir wrote:
> 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?
>
>
For Component Pascal do
Out.String("Hello,"+name+", how do you do?");
-Doug Danforth
More information about the Oberon
mailing list