home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!walter!qualcom.qualcomm.com!network.ucsd.edu!ucsbcsl!engrhub.ucsb.edu
- From: sekey@engrhub.ucsb.edu (Andrew Sekey)
- Newsgroups: comp.sys.mac.hypercard
- Subject: Initializing HC variables
- Message-ID: <7183@ucsbcsl.ucsb.edu>
- Date: 18 Dec 92 23:01:56 GMT
- Sender: root@ucsbcsl.ucsb.edu
- Organization: University of California, Santa Barbara
- Lines: 21
-
-
- Suppose we have an array of variables x1, x2, x3, etc, and we want to
- initialize them to zero, i.e. to set:
-
- x1 = 0; x2 = 0, ........xN = 0.
-
- Can this be done in a "repeat" structure?
-
- (What would be obvious in e.g. Fortran, does not work:
-
- repeat with j = 0 to N
- put 0 into x & j
- end repeat
-
- since even including a line 'put x & j into dummy', when followed by
- 'put 0 into dummy', will only change 'dummy', not xj.)
-
- Any offers?
-
- Andrew
-
-