🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: net.micro.atari
1 messages
1 total messages Started by Steve Tynor Wed, 26 Feb 1986 18:59
Re: TDI Modula ST InOut implementation (actually TextIO)
#2565
Author: Steve Tynor
Date: Wed, 26 Feb 1986 18:59
95 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads