Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!nero!icsu8209 From: icsu8209@nero.cs.montana.edu (Glassy) Newsgroups: comp.lang.modula2 Subject: Re: How to write NEW? Summary: really? Message-ID: <3836@dali> Date: 22 Apr 91 23:27:19 GMT References: <1991Apr22.155056.10010@cc.newcastle.edu.au> <14627@encore.Encore.COM> Sender: usenet@dali.cs.montana.edu Organization: Montana State University, Dept. of Computer Science, Bozeman MT 59717 Lines: 26 In article <14627@encore.Encore.COM> soper@encore.UUCP (Pete Soper,Cary NC,9194813730,9193624635) writes: >From article <1991Apr22.155056.10010@cc.newcastle.edu.au>, by eepjm@cc.newcastle.edu.au: >> >> The answer is actually quite simple, it's only the documentation that's >> bad. EVERY Modula-2 compiler supports NEW and DISPOSE (if you find one >> that doesn't, you've been cheated) in the following way. When NEW(Var) > > There are lots of cheated folks out there in that case. Compilers >implementing the language described by edition three of the Wirth book do not >contain NEW and DISPOSE. This is another case where Wirth fiddled with the Really? I'm surprised. Truly. I've used the shareware FST compiler, which is based on 3rd ed. PIM2 (according to the documentation). The FST documentation didn't explicitly -say- that NEW and DISPOSE were translated into corresponding calls to ALLOCATE and DEALLOCATE (i think!), but -did- say that if you wanted to use NEW and DISPOSE, you had to import {DE}ALLOCATE from Storage. The docs for the StonyBrook QuickMod compiler I've used said the same. Just a couple of data points, I suppose... >Pete Soper (soper@encore.com) +1 919 481 3730 >Encore Computer Corp, 901 Kildaire Farm Rd, bldg D, Cary, NC 27511 USA