Forum unknown
· Programming
#TDI Modula v2 issues
19 messages in this thread
Hi Les.
I've got a few things I'd like to discuss regarding TDI Modula-2 v2.
First, here's my bug report:
1. There still is a problem with declaration of large data structures. For
example, if I declare more than 40K in variables I get the following
msg: '208: global data too large for this processor'
2. There still is a problem with unary minus. WriteInt(-n + 5,1) where n
is 5 prints -10 instead of 0!!!
3. Transfer functions are still not implemented for declared types. At
least tell us WHICH transfer functions are not implemented
4. Trapper module is broken! There is one trivial bug in the WriteHex
procedure in it which caused it to loop printing zeros. This was easy
to fix, but even so the information Trapper prints is nonsense (for
example, the relative address of the offending code is incorrect). I
don't think that this is a problem with Trapper itself; more likely in
the error packet which (I guess) is passed by AMIGAX. So (I guess) the
bug is in AMIGAX
5. Serious bug which I spent hours tracking down: comparison of functions
is incorrect – it returns the OPPOSITE result. For example if you have
the function foo(x) which simply returns x (i.e. foo(x)=x ) then the
following evaluates as TRUE : (foo(2) > foo(4)). The sample program in
the next message demonstrates the problem.
Some more comments:
6. The updated manual for ver 2 is inconsistent. It refers to v2 changes,
has an updated item cross reference, and has a definition file listing
for new modules such as LongInOut and RealInOut, yet the listing for
InOut is the old listing, and the poor people who have purchased the
basic package won't learn of such new things as OpenInputOutputFile.
7. I couldn't find any mention of an ATOM-like utility. How will Modula
software behave on a system with more than 512k?
Please don't take me wrong. I think this is a great package, and that
you guys at TDI are quite responsive and do a good job. Keep up the
good work! – Steve –
Here's the sample program to demonstrate the function comparison
bug:
MODULE ppp;
(****************************************************************************
* This little program demonstrates the bug in the TDI compiler v2.20 which *
* messes up on comparison of functions. *
****************************************************************************)
(* *)
FROM InOut IMPORT WriteString, WriteLn, WriteInt, ReadInt;
(* *)
VAR
x,y : INTEGER;
(* *)
PROCEDURE FooInt(n : INTEGER): INTEGER;
BEGIN
RETURN(n)
END FooInt;
(* *)
BEGIN
REPEAT
WriteString('Enter x, y: ');
ReadInt(x); ReadInt(y);
WriteString('Integer test:'); WriteLn;
WriteString('x = '); WriteInt(x,1);
WriteString(' y = '); WriteInt(y,1); WriteLn;
WriteString('FooInt(x) = '); WriteInt(FooInt(x),1);
WriteString(' FooInt(y) = '); WriteInt(FooInt(y),1); WriteLn;
IF FooInt(x) < FooInt(y) THEN
WriteString('FooInt(x) < FooInt(y)')
ELSIF FooInt(x) > FooInt(y) THEN
WriteString('FooInt(x) > FooInt(y)')
ELSE
WriteString('FooInt(x) = FooInt(y)')
END;
WriteLn; WriteLn;
UNTIL x = -999;
END ppp.
Here's the sample program to demonstrate the function comparison
bug:
MODULE ppp;
(****************************************************************************
* This little program demonstrates the bug in the TDI compiler v2.20 which *
* messes up on comparison of functions. *
****************************************************************************)
(* *)
FROM InOut IMPORT WriteString, WriteLn, WriteInt, ReadInt;
(* *)
VAR
x,y : INTEGER;
(* *)
PROCEDURE FooInt(n : INTEGER): INTEGER;
BEGIN
RETURN(n)
END FooInt;
(* *)
BEGIN
REPEAT
WriteString('Enter x, y: ');
ReadInt(x); ReadInt(y);
WriteString('Integer test:'); WriteLn;
WriteString('x = '); WriteInt(x,1);
WriteString(' y = '); WriteInt(y,1); WriteLn;
WriteString('FooInt(x) = '); WriteInt(FooInt(x),1);
WriteString(' FooInt(y) = '); WriteInt(FooInt(y),1); WriteLn;
IF FooInt(x) < FooInt(y) THEN
WriteString('FooInt(x) < FooInt(y)')
ELSIF FooInt(x) > FooInt(y) THEN
WriteString('FooInt(x) > FooInt(y)')
ELSE
WriteString('FooInt(x) = FooInt(y)')
END;
WriteLn; WriteLn;
UNTIL x = -999;
END ppp.
Steve – Thanks for your bug report. All data and heap size restrictions
will be removed in the next release. 64 bit reals will be fully
implemented. This work is almost finished. I anticipate the new release
within the next 2 1/2 months complete with a full screen editor (to replace
m2error).
Releasing the full source to all the Amiga modules in the Commercial
version has turned out to be a very good move for us. By doing so, we have
many additional outside Modula-2 programmers that locate, report and
correct bugs in our Amiga modules. The next release should be nearly bug
free.
I am using Modula-2 with a 1 meg system (from C. Ltd.) and have had no
problems (although I am sure there will be some conflicts with 1.2). There
is no ATOMlike utility in the current release. We will probably have a
compiler option in the next release to specify chip memory. Regards, Les
Les– That's great news on the unrestricted sizes for the next version.
I'll take a copy as soon as it's available. I've recently started using the
Amiga M2 much more as the compiler error 2 in MOSYS has stopped all
progress there.
Will the new compiler support the required : in variant record definitions
without a tag variable as per Wirth's recent upgrades?
CASE :BOOLEAN OF
TRUE : a: INTEGER |
FALSE: b: REAL
END;
Tom
Tom – I will have some programmers over from England later this month.
Maybe we can put together a more current version of MoSys for you. All of
our development work for the Amiga is done on the Pinnacle under MoSys.
I don't know about the variant record definitions without a tag variable.
If it is part of Wirth's recent upgrades, I assume it will go in at the
same time as the other enhancements. Our English half stays in close
contact with Wirth. Regards, Les
Tom – I will have some programmers over from England later this month.
Maybe we can put together a more current version of MoSys for you. All of
our development work for the Amiga is done on the Pinnacle under MoSys.
I don't know about the variant record definitions without a tag variable.
If it is part of Wirth's recent upgrades, I assume it will go in at the
same time as the other enhancements. Our English half stays in close
contact with Wirth. Regards, Les
Les– That's great news on the unrestricted sizes for the next version.
I'll take a copy as soon as it's available. I've recently started using the
Amiga M2 much more as the compiler error 2 in MOSYS has stopped all
progress there.
Will the new compiler support the required : in variant record definitions
without a tag variable as per Wirth's recent upgrades?
CASE :BOOLEAN OF
TRUE : a: INTEGER |
FALSE: b: REAL
END;
Tom
That's great news, Les!
I can't wait for the new release. Let me congratulate you on
your wise decision to offer all the source in the commercial package.
I hope other software vendors would follow the example.
– Steve –
That's great news, Les!
I can't wait for the new release. Let me congratulate you on
your wise decision to offer all the source in the commercial package.
I hope other software vendors would follow the example.
– Steve –
Les– Another question or 2. The TDI compiler seems to return fail codes
in the range 100..999 even for a good compile. Had to use failat 9999 in
an execute file. Is there a predictable fail code response that the
compiler uses? I'd like to use the fail code in the Modula 2 make routine
to decide whether to carry on after a compile.
MIN & MAX don't know what to do with REAL. I believe MAX(REAL) is legal and
should be supported.
Is the routine that you use to provide the DEF module cross reference
listings available? The listings are quite useful and I'd like to use it on
my code. Also, a useful addition would be to also show which DEF modules
import each symbol.
After many lockups and gurus I gave up on m2error and now use multi window
capability of TxEd for looking at .erm files. Is it just me or do others
report m2error problems.
The Amiga TDI Modula 2 development environment is very nice and you have a
winner. The only thing I miss is the speed and space available on the
Pinnacle.
Tom
Tom – The error codes the compiler returns are meaningless. Use the FailAt
60000 command when creating execute script files.
Meaningful error codes are on the list of things to be added. MAX (REAL)
should be in the next release. Please send me a list of any areas we are
lacking so they can be nailed down in the next release.
I have had reports that M2Error will lock up sometimes when there are
unbalanced END's in the source code. Our Mac and Atari products have full
screen editors which locate the errors. I am pressing for an Amiga full
screen editor. I have heard that some users have modified public domain
editors to use our ERM files. I will try and find someone to send me a
copy that I can upload. Regards, Les
Tom – The error codes the compiler returns are meaningless. Use the FailAt
60000 command when creating execute script files.
Meaningful error codes are on the list of things to be added. MAX (REAL)
should be in the next release. Please send me a list of any areas we are
lacking so they can be nailed down in the next release.
I have had reports that M2Error will lock up sometimes when there are
unbalanced END's in the source code. Our Mac and Atari products have full
screen editors which locate the errors. I am pressing for an Amiga full
screen editor. I have heard that some users have modified public domain
editors to use our ERM files. I will try and find someone to send me a
copy that I can upload. Regards, Les
Les– Another question or 2. The TDI compiler seems to return fail codes
in the range 100..999 even for a good compile. Had to use failat 9999 in
an execute file. Is there a predictable fail code response that the
compiler uses? I'd like to use the fail code in the Modula 2 make routine
to decide whether to carry on after a compile.
MIN & MAX don't know what to do with REAL. I believe MAX(REAL) is legal and
should be supported.
Is the routine that you use to provide the DEF module cross reference
listings available? The listings are quite useful and I'd like to use it on
my code. Also, a useful addition would be to also show which DEF modules
import each symbol.
After many lockups and gurus I gave up on m2error and now use multi window
capability of TxEd for looking at .erm files. Is it just me or do others
report m2error problems.
The Amiga TDI Modula 2 development environment is very nice and you have a
winner. The only thing I miss is the speed and space available on the
Pinnacle.
Tom
One more thing, Les. Would it be possible to obtain the Item Cross
Reference in some kind of electronic/magnetic form? It's nice having it on
paper, but I (and I'm sure everyone else) would find it more usefull to be
able to search thru it using a text editor. Maybe you could upload it
here? – Steve –
Steve – I don't know if we can get the item cross reference into a form
that could be uploaded and read. The manual was created using Andra, a
Modula-2 based typesetting system with its own internal format. Remind me
after our next release and I will see. I want the programmers to focus on
the more pressing issues until then. Regards, Les
Steve – I don't know if we can get the item cross reference into a form
that could be uploaded and read. The manual was created using Andra, a
Modula-2 based typesetting system with its own internal format. Remind me
after our next release and I will see. I want the programmers to focus on
the more pressing issues until then. Regards, Les
One more thing, Les. Would it be possible to obtain the Item Cross
Reference in some kind of electronic/magnetic form? It's nice having it on
paper, but I (and I'm sure everyone else) would find it more usefull to be
able to search thru it using a text editor. Maybe you could upload it
here? – Steve –
Steve – Thanks for your bug report. All data and heap size restrictions
will be removed in the next release. 64 bit reals will be fully
implemented. This work is almost finished. I anticipate the new release
within the next 2 1/2 months complete with a full screen editor (to replace
m2error).
Releasing the full source to all the Amiga modules in the Commercial
version has turned out to be a very good move for us. By doing so, we have
many additional outside Modula-2 programmers that locate, report and
correct bugs in our Amiga modules. The next release should be nearly bug
free.
I am using Modula-2 with a 1 meg system (from C. Ltd.) and have had no
problems (although I am sure there will be some conflicts with 1.2). There
is no ATOMlike utility in the current release. We will probably have a
compiler option in the next release to specify chip memory. Regards, Les