Path: utzoo!utgpu!watserv1!watmath!att!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!ncar!umigw!mthvax!mathrich From: mathrich@mthvax.cs.miami.edu (Rich Winkel) Newsgroups: comp.lang.pascal Subject: Re: Dynamic arrays in TP5.0 Message-ID: <1990Jul8.200026.29195@mthvax.cs.miami.edu> Date: 8 Jul 90 20:00:26 GMT References: <1831@krafla.rhi.hi.is> Organization: U of Miami Dept. of Math. and Computer Science, Coral Gables, FL 33124 Lines: 27 In <1831@krafla.rhi.hi.is> binni@rhi.hi.is (Brynjolfur Thorsson) writes: >I am trying to use dynamic arrays in my TP5.0 program but am having a hard >time. I want to be able to do things like they are done in C, e.g. >*(x + 10) = 100.5 >but I have not found a way to do it. Below is a short program demonstrating >what I want to do, but I have no idea, how to make GetVal and PutVal. If you >have suggestions for me I would appreciate it. I can't believe that this is >impossible in TP. >*************************************************** >Program dynamic; >Var > y : ^array [1..10] of Real; <---- > x : Real; >Begin > GetMem(y, SizeOf(^y)); <---- > ^y[5]:=12.34; <---- > x :=^y[3]; <---- >End. I believe this will work. Rich