home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!mcsun!sun4nl!sci.kun.nl!severus.mbfys.kun.nl!gunter
- From: gunter@mbfys.kun.nl (Gunter Windau)
- Subject: Re: pointers to arrays?!?
- Message-ID: <C0p11p.9Et@sci.kun.nl>
- Sender: news@sci.kun.nl (News owner)
- Nntp-Posting-Host: severus.mbfys.kun.nl
- Organization: University of Nijmegen, The Netherlands
- References: <1993Jan11.205412.1@cc.newcastle.edu.au>
- Date: Mon, 11 Jan 1993 14:17:48 GMT
- Lines: 37
-
- glgam@cc.newcastle.edu.au (GLGAM) writes:
-
-
- >To access a particular element in an array I would use..
-
- >ArrayVar[Index] := etc..
-
- >Suppose I had setup a pointer to an array on the heap... How do I access the
- >individual elements ?
-
- >ie.
-
- >Type
- > ArrayType = Array[1..Max] of Char;
-
- >Var
- > ArrayVar : ^ArrayType;
- > Index : Word;
-
- >[..]
-
- >ArrayVar[Index]^ := etc..????
- How about:
- ArrayVar^[Index] := ...
-
- >Doesn't work.. I know why.. I just can't for the life of me figure
- >out what _does_ work..
-
-
- >Regards,
-
- >Scott.
- >
- --
- G\"unter Windau e-mail: gunter@mbfys.kun.nl
- Dept. Medical Physics & Biophysics voice: +31 80 617139
- Univ. of Nijmegen, The Netherlands (((()))))))))))))))))))))))
-