home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!dtix!falcon.navsses.navy.mil!huynh
- From: huynh@falcon.navsses.navy.mil
- Newsgroups: comp.lang.c
- Subject: converting C 'for' to PASCAL 'FOR'
- Message-ID: <1992Jul28.151937.247@falcon.navsses.navy.mil>
- Date: 28 Jul 92 20:19:37 GMT
- Organization: NSWCCD, Naval Ship Systems Eng Sta, Phila PA
- Lines: 15
-
- Hello,
-
- I am curious if there is a way to translate the "C" for(i,start,last,incr)
- statement into the PASCAL FOR i = start to last DO (* incr = 1 *).
- I am interested in doing this using the #define statement.
- Has anyone done this? Help is much appreciated.
-
- Here is an example of how the "C" 'for' statement is translate into FORTRAN
- 'DO':
- #define DO(i,start,last,incr) for((i)=(start);(i)<=(last);(i)+=(incr))
-
- Thanks in advance.
-
- Nhan H. Huynh, PASCAL 's structure 's best
- Science and Engineering Aprrentice, Naval Base, Philadelphia PA.
-