Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!zephyr.ens.tek.com!vice!bobb From: bobb@vice.ICO.TEK.COM (Bob Beauchaine) Newsgroups: comp.lang.pascal Subject: Re: need dynamic array on heap Message-ID: <7361@vice.ICO.TEK.COM> Date: 25 Apr 91 21:49:49 GMT References: <13834@ms.maus.de> Reply-To: bobb@vice.ICO.TEK.COM (Bob Beauchaine) Distribution: world,comp Organization: Tektronix, Inc., Beaverton, OR. Lines: 22 In article <13834@ms.maus.de> Kai_Henningsen@ms.maus.de (Kai Henningsen) writes: > > >You most certainly don't need the type cast, you need a correct type >definition. As I already said, declare buffer as pointer to an array, not as >simply "pointer"; then, you can leave any casts out. I do it all the time. > *AS MY EXAMPLE WAS WRITTEN*, a typecast was necessary. True, there is more than one way to skin the cat, but the original post implied that a typecast in my example was not necessary, which is blatantly not the case. As for correctness of the type declaration, let's not make judgements about code which is syntactically proper but doesn't meet your definition of correctness. /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ Bob Beauchaine bobb@vice.ICO.TEK.COM C: The language that combines the power of assembly language with the flexibility of assembly language.