Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!decwrl!ucbvax!GATEWAY.QM.APPLE.COM!Bob_Campbell.ZORRO From: Bob_Campbell.ZORRO@GATEWAY.QM.APPLE.COM (Bob Campbell) Newsgroups: comp.lang.modula2 Subject: Re: MetCom Message-ID: <63038912041515Bob_Campbell.ZORRO@gateway.qm.apple.Com> Date: 4 Dec 89 22:15:06 GMT References: <891204.13351181.096571@UWEC.CP6> Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Modula2 List Organization: Apple Computer, Inc. Lines: 26 I don't think that MetCom supports NEW or DISPOSE, N. Wirth choice to delete these features from the language, as they required ALLOCATE, and DEALLOCATE to be imported from another module. NEW is ALLOCATE(x,SIZE(x)) DISPOSE is DEALLOCATE(x,SIZE(x)) Also note that TSIZE was also removed from the language, and SIZE was redefined to handle both variables and types (most compilers still support TSIZE). It should not be too hard to write a script to convert them. s/ALLOCATE(\([~,]*\),SIZE(.*))/NEW(\1)/gp s/DEALLOCATE(\([~,]*\),SIZE(.*))/DISPOSE(\1)/gp My vi is a little bit rusty, in MPW it would be: replace /ALLOCATE\(([option-l,]*)option-r1,SIZE(option-x))/ "NEW(option-r1)" replace /DEALLOCATE\(([option-l,]*)option-r1,SIZE(option-x))/ "DISPOSE(option-r1)" (It is a little hard to some the MPW commands using Usenet which does not have the full Macintosh Character Set). I don't have a cute trailer************** Applelink: BOBC (BOBC@Applelink.apple.com) Quickmail: Bob Campbell@ZORRO (Bob_Campbell.ZORRO@gateway.qm.apple.com)