home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!news.univie.ac.at!chx400!news.unige.ch!ugun2b!cuisunh!tamone
- Newsgroups: comp.sys.mac.programmer
- Subject: Simple question with MPW Pascal tool
- Message-ID: <1992Nov23.112943.19200@uni2b.unige.ch>
- From: tamone@cuisunh.unige.ch (TAMONE Francois)
- Date: 23 Nov 92 11:29:42 +0200
- Reply-To: tamone@cuisunh.unige.ch (TAMONE Francois)
- Distribution: world
- Organization: University of Geneva, Switzerland
- Nntp-Posting-Host: cuisunh.unige.ch
- Lines: 44
-
-
- Hi,
-
- I have a trivial question about MPW pascal I/O in a tool type application.
-
- I just wanted to make a simple program to compute some composed interest rate.
-
- The problem is I can't read an integer or a real and write them properly.
- In standard Pascal and most implementation in the Galaxy, when you have a var
- integer or real name 'var1', you can do
-
- readln(var1);
-
- and
-
- writeln(var1);
-
- This is the least, no ? But here in MPW, it does not work that way. The answer
- to that must be stupid but, there is still one to find. Yes I checked FAQs and
- MPW doc and InsideMac. I don't have the Pascal doc though. And I don't want to
- spend hours on this which should work pretty straight, whithout beeing rude.
-
- The error I get when I write is either 0 for all integers or NAN(017) for a
- real (meaning Not-a-Number, ascii conversion error). Where's the rub ? In a
- tool application, standard input an output should be the MPW shell so ? Maybe I
- do not type the right eoln char after I input my number ? Here Carriage Return
- wont do so I type Enter.
-
- (In the meantime I programmed my little problem on a vax with no problem)
-
-
- Another little question, can I drop in MacsBug inside a programm by a call like
-
- if i<0 then do
- EnterMacsBug
- else
- writeln('this is TOOOO much');
-
- Thanks for the help on this trivial question. The most trivial questions
- are one
- of the most annoying since they should not arise. I am pretty annoyed,
- you see...
-
- Francois
-