home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / pascal / 8026 < prev    next >
Encoding:
Text File  |  1993-01-11  |  818 b   |  40 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!munnari.oz.au!metro!seagoon.newcastle.edu.au!cc.newcastle.edu.au!glgam
  3. From: glgam@cc.newcastle.edu.au (GLGAM)
  4. Subject: pointers to arrays?!?
  5. Message-ID: <1993Jan11.205412.1@cc.newcastle.edu.au>
  6. Lines: 29
  7. Sender: news@seagoon.newcastle.edu.au
  8. Organization: University of Newcastle, AUSTRALIA
  9. Date: Mon, 11 Jan 1993 09:54:12 GMT
  10.  
  11.  
  12. To access a particular element in an array I would use..
  13.  
  14. ArrayVar[Index] := etc..
  15.  
  16. Suppose I had setup a pointer to an array on the heap...  How do I access the
  17. individual elements ?
  18.  
  19. ie.
  20.  
  21. Type
  22.    ArrayType = Array[1..Max] of Char;
  23.  
  24. Var
  25.    ArrayVar  : ^ArrayType;
  26.    Index     : Word;    
  27.  
  28. [..]
  29.  
  30. ArrayVar[Index]^ := etc..????
  31.  
  32. Doesn't work..  I know why..  I just can't for the life of me figure
  33. out what _does_ work..
  34.  
  35.  
  36. Regards,
  37.  
  38. Scott. 
  39.         
  40.