[Oberon] Dynamically sized allocation with NEW()
Tomas Kral
thomas.kral at email.cz
Thu Aug 2 20:10:18 CEST 2018
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>
More information about the Oberon
mailing list