Article View: comp.lang.modula2
Article #4869Re: HELP with LONGINT...
From: F S Taylor
Date: Tue, 06 Jun 1989 11:03
Date: Tue, 06 Jun 1989 11:03
55 lines
1912 bytes
1912 bytes
In article <12900003@uxh.cso.uiuc.edu> bmcgough@uxh.cso.uiuc.edu writes:
> Can someone tell me why the following is illegal
> ( or at least gives me an error in PD Atari ST
> Modula Compiler )
>
> VAR p: LONGINT;
>
> BEGIN
> FOR p := 0 TO 100 DO
> (...)
> END
> END.
>
I have tried it on our SUN3/280 (running Mocka - Modula-2 Karlsruhe (I
think)) and it seemed to work, the FOR loop bit that is. I trust you
have a MODULE line at the top of the program like this:-
MODULE name;
I also noted that the END. is also missing the MODULE name. It should
be like this :-
END name.
The code I tried was -
MODULE test;
FROM InOut IMPORT WriteString, WriteLn;
VAR
n: LONGINT;
BEGIN
FOR n := 1 TO 100 DO
WriteString( "Hi there.");
WriteLn()
END
END test.
Apart from these syntactic points above I can't think why it wouldn't
compile a FOR loop using LONGINTs as the control type. It is difficult
to help further without the exact error and code.
Frank.
--
| Frank Taylor | Engineers often ponder upon the problem... |
| DoC 1 | Why do the girls with the most streamlined shape offer |
| Imperial College | the most resistance? anon. |
|--------------------+--------+-----------------------------------------------|
| JANET: zmacu06@doc.ic.ac.uk | All rights unreserved. |
Technical Details
Message-ID:
<ZMACU06.89Jun6120309@flamingo.doc.ic.ac.uk>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!ukc!icdoc!gould!zmacu06Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!ukc!icdoc!gould!zmacu06 From: zmacu06@doc.ic.ac.uk (F S Taylor) Newsgroups: comp.lang.modula2 Subject: Re: HELP with LONGINT... Message-ID: <ZMACU06.89Jun6120309@flamingo.doc.ic.ac.uk> Date: 6 Jun 89 11:03:09 GMT Sender: news@doc.ic.ac.uk Distribution: comp Organization: DoC, Imperial College, London SW7, UK. Lines: 55