[net.micro.atari] TDI Modula ST InOut implementation

tynor@gitpyr.UUCP (Steve Tynor) (02/26/86)

   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