Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!smurf!artcom0!hb.maus.de!ms.maus.de!Kai_Henningsen From: Kai_Henningsen@ms.maus.de (Kai Henningsen) Newsgroups: comp.lang.pascal Subject: Re: need dynamic array on heap Message-ID: <13761@ms.maus.de> Date: 21 Apr 91 17:10:00 GMT Article-I.D.: ms.13761 Distribution: world,comp Organization: Maus Mailbox Netz - UUCP-Gateway Bremen Lines: 27 JG>In article <1991Apr12.234843.9031@ux1.cso.uiuc.edu> amead@s.psych.uiuc.edu ( JG>>I want to put aside a chunk of the heap and then index it by byte like JG>>an array of byte. I could just declare it as some type like JG>>'array[1..64000] of byte', but I want to use GetMem so that the array will JG>>really be dynamic (I don't want to use 64K each time). JG>> JG>> Buff[1]^ := 2; JG>> ^ Invalid qualifier JG>> JG>>so does anyone know, is this sort of thing possible? Can you do this JG>>easily in C? Of course it's possible, even in TP. Do exactly what you would do with new, only use GetMem: type tBuff = array [0 .. maxit] of byte; var Buff: ^tBuff; begin GetMem(Buff, 1864); Buf^[17] := 42; ... I do that all the time ... MfG Kai