home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!sun4nl!fwi.uva.nl!gene.fwi.uva.nl!timmer
- From: timmer@fwi.uva.nl (Ralf Timmer (I89))
- Subject: Clipper 5.01 array problem
- Message-ID: <1992Nov17.102200.12123@fwi.uva.nl>
- Sender: news@fwi.uva.nl
- Nntp-Posting-Host: gene.fwi.uva.nl
- Organization: FWI, University of Amsterdam
- Date: Tue, 17 Nov 1992 10:22:00 GMT
- Lines: 49
-
- Hi,
-
- I've got a Clipper 5.01 question about passing array elements by
- reference.
- To manage this I use Straleys :
-
- #xtranslate @@<exp> => {|x| IF( x = NIL, <exp>, <exp> := x) }
-
- I use this as follows:
-
- IF aExtra[1,1] != ""
- @ nRegel++,47 GET aExtra[1,2] VALID Control(@@aExtra[1,2], nX)
- ENDIF
-
- where Control is like:
-
- Function Control(Item,X)
- ...
- LOCAL nTemp,....
-
- IF VALTYPE(Item) = "B"
- nTemp := EVAL(Item)
- ELSE
- nTemp := Item)
- ENDIF
- ....
- ...
- ..
- RETURN .T.
-
- This works.
-
- But, if I place the above IF..GET..ENDIF in a FOR..NEXT loop, with
- the index of aExtra is the same as the loop counter it doesn't work
- anymore!?
-
- FOR i:= 1 TO 6
- IF aExtra[i,1] != ""
- @ nRegel++,47 GET aExtra[i,2] VALID Control(@@aExtra[i,2], nX)
- ENDIF
- NEXT
-
- I get an array boundary error at the EVAL call, why?
-
-
- --
- Ralf Timmer Department of Computer Science
- Email: timmer@fwi.uva.nl University of Amsterdam
- --
-