[Oberon] Dynamically sized allocation with NEW()

Jörg Straube joerg.straube at iaeth.ch
Thu Aug 2 21:49:14 CEST 2018


Right!

Jörg

> Am 02.08.2018 um 20:10 schrieb Tomas Kral <thomas.kral at email.cz>:
> 
> On Thu, 2 Aug 2018 19:38:10 +0200
> Jörg <joerg.straube at iaeth.ch> wrote:
> 
>> FontDesc = RECORD
>>    raster: ARRAY 2000 OF BYTE
>>  END;
>>  LargeFontDesc = RECORD (FontDesc)
>>    extRaster: ARRAY 1000 OF BYTE
>>  END;
>>  VAR F:  = ; LF: LargeFont;
>>  IF len<2000 THEN NEW (F) ELSE NEW(LF); F := LF END;
> 
> Rather clever, the below two pointers are needed, correct?
> 
> Font = POINTER TO FontDesc;
> LargeFont = POINTER TO LargeFontDesc;
> 
> 
> -- 
> Tomas Kral <thomas.kral at email.cz>
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon



More information about the Oberon mailing list