Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!spool.mu.edu!munnari.oz.au!brolga!uqcspe!cs.uq.oz.au!warwick From: warwick@cs.uq.oz.au (Warwick Allison) Newsgroups: comp.lang.modula2 Subject: Re: How to write NEW? (A solution) Message-ID: <937@uqcspe.cs.uq.oz.au> Date: 22 Apr 91 07:41:53 GMT References: <5122672@janhh.hanse.de> Sender: news@cs.uq.oz.au Reply-To: warwick@cs.uq.oz.au Lines: 20 Use the C preprocessor. #define NEW(p) ALLOCATE(p,SIZE(p^)) That, I think is the only solution, unless you want to change NEW to use it as NEW(a,a^), in which case just implement: PROCEDURE NEW(VAR a:ADDRESS; VAR adata:ARRAY OF BYTE); and hope that you compiler will not actually dereference a to get a^ since it does not actually need to know the data. How about that for an ugly kludge? Warwick. -- _-_|\ warwick@cs.uq.oz.au / * <-- Computer Science Department, \_.-._/ University of Queensland, v Brisbane, AUSTRALIA.