Article View: net.micro.atari
Article #2565Re: TDI Modula ST InOut implementation (actually TextIO)
From: Steve Tynor
Date: Wed, 26 Feb 1986 18:59
Date: Wed, 26 Feb 1986 18:59
95 lines
2622 bytes
2622 bytes
Re: the recent note pointing out the deficiencies of the TDI InOut
module:
Actually, I think the problem lies in the TextIO module. I've had
similar problems to those described while using TextIO. Here's what I'm
trying to read: a file of CARDINALs (one to a line):
1
2
3
4
etc...
I was trying to use:
LOOP
TextIO.REadCard (stream, c);
TextIO.REadLn (stream);
END;
but unfortunately, TextIO doesn't work as you'd expect (so what's new?)
Here's what I've actually had to do in order to get this to work: I've
changed the file format to put a blank line in between each CARDINAL. Thus:
1
2
3
4
etc.
and i've had to change my code to:
LOOP
TextIO.REadCard (stream, c);
TextIO.REadLn (stream);
TextIO.REad (stream, DUMMYCHAR);
END;
talk about a kludge...
------------------------------------------------------------
Also, I've noticed that the TDI compiler doesn't check function return
value types, thus:
PROCEDURE p () : Pointer1Type;
VAR
p2 : Pointer2Type;
BEGIN
RETURN p2;
END p;
is *NOT* flagged as an error.
------------------------------------------------------------
Also, I've had trouble using Strings. Say you have a proc:
PROCEDURE p (VAR str : ARRAY OF CHAR);
You can't call:
p ('this is a string constant');
But you can do:
CONST str = 'this is also a string constant';
p (str);
------------------------------------------------------------
Also, when I try to use a Set constant with about 30 elements (they *say*
that they can handle them...) then do a:
IF MyVar IN BigConstantSet THEN
...
I get MUSHROOMS from the COMPILER !!!!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Progress means replacing something wrong with something more subtly wrong.
Steve Tynor
Georgia Instutute of Technology
...{akgua, allegra, amd, harpo, hplabs,
ihnp4, masscomp, ut-ngp, rlgvax, sb1,
uf-cgrl, unmvax, ut-sally} !gatech!gitpyr!tynor
Technical Details
Message-ID:
<1475@gitpyr.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!gatech!gitpyr!tynorShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!gatech!gitpyr!tynor From: tynor@gitpyr.UUCP (Steve Tynor) Newsgroups: net.micro.atari Subject: Re: TDI Modula ST InOut implementation (actually TextIO) Message-ID: <1475@gitpyr.UUCP> Date: Wed, 26-Feb-86 13:59:38 EST Article-I.D.: gitpyr.1475 Posted: Wed Feb 26 13:59:38 1986 Date-Received: Fri, 28-Feb-86 07:01:19 EST Reply-To: tynor@gitpyr.UUCP (Steve Tynor) Organization: Georgia Institute of Technology Lines: 95