[Oberon] ANY type cast

Dan Parnete dan.parnete at fastwebnet.it
Tue Apr 12 10:47:25 CEST 2005


Hello,

    I didn't found any documentation about ANY type, but it's easy to 
understand it is another PTR. The only difference I've seen is that only 
PACO compiler recognize it.
    The question is: if it cast any POINTER and OBJECT why didn't cast 
PONITER TO ARRAY OF CHAR? Or better, why only one direction?  If we have:
    VAR data: ANY;  str: Utilities.String;
the assignment
    data := str;
is ok for the compiler, but the condition:
    data IS Utilities.String    , or the cast    data(Utilities.String)  
, or   WITH data: Utilities.String DO
are not.
    How can I recuperate the value pointed by data, witch in this case 
is a string?

Many thanks,
Dan Parnete



More information about the Oberon mailing list