M2S Strings + Reals Prob
I'm having LOADS of trouble with the M2S floating point and string
routines.
The Real and LongReal conversions to strings are universally off by 4.99.
The TRUNC routine is off by 1 (e.g truncates 6.6E1 to 65!). Anyway, I tried
to build my own conversion routines in M2S and found many difficulties with
string processing. To look like the existin libary routines, I pass an
ARRAY OF CHAR VAR to a routine, load it CHR by CHR and then try to
terminate it with a null or linefeed. Whatever I put at the end of the
string using InsertSubString causes the machine to crash when run
eventhough the compiler lets both of those characters go by for inserting
into the substring.
Each time I try to use Modula 2 I find the restrictions driving me to C.
Very disappointing since I don't have a C compiler. You can't write printer
drivers in Modula 2, can't link M2 to other language object modules, and
the string processing is very cumbersome. Its just very frustrating to sit
down to write a quicky routine to patch some Desktop Budget files (Gold
DIsk can't seem to ballance accounts very well, and they don't give you the
lattitude to change it in the application) and end up spendind weeks trying
to work around both problems in the compiler and unreasonable restrictions
in the language. Seems like Modula2 is good for the basic "hello world"
stuff you do in school, but so far I've not been able to complete one
project with it. Always end up having to use C, assem of sometimes even
BASIC!
Am I the only one having these trouble with M2S/Modula 2?
wmc