CompuServe Thread

#C example problem

8 messages in this thread
#91438From: Allen MittsOct 29, 1987 7:58 PM
Ed, the delay was set to 1 million (1000000). You said in your message that you 'counted 5'. I'm sorry, I'm not sure what you meant. I read the thread again and the only thing I can get is that you counted 5 errors. Is this correct? If so, this means you have 'Inside the Amiga with C' by John Thomas Berry. I've tried 3 programs from this book now and cannot get any of them to run for me. They all do the same thing – nothing – with 'last command did not set a return code' as the cause. As a beginner with this, I'm completely stumped. Allen
#91467From: Ed SilvaOct 29, 1987 9:57 PM
Allan, i ment 5 brackets ( { ) ,sorry . Maybe you should do a forever loop to actually see the prog run or you can put a bunch of prin*****\n); on several lines of the code and then see how far the program goes. Also have you compiled any C proggrams succesfully , i mean any? also instead of using the LC use the make batch file found in Lattice C or maybe just try doing little programs at one. One bug that i had on almost all of my firsts C prog was a mix of '=' and '==' and of increment and decrement operators ( ++ — ) so try litle progs like int count; main() { print (" hello \n"); for ( count = 0; count < 1000000; count++); } also why dont you download one of these prog to my Email and i will do a quick check on it. Ed Silva
#91517From: Allen MittsOct 30, 1987 4:14 AM
Ed, Yes, I can see your point! Very easy to get confused (especially for a new comer to the language – about a week in my case). Yes, I was able to compile the Hello World demo that Lattice has in the front of their book. Also, just found out what the problem was: OpenLibrary(intuition.Library) is what the book indicates, but Dan James (author of the Comm series of telecomm prgs) told me that the 'L' needs to be lowercase or AmigaDOS will not accept it, so: OpenLibrary(intuition.library) Which means it IS case sensitive. AS far as I can tell, this is a little bug throughout the entire book! Thanks very much for your assistance and offers of help. I hope I can take a rain check…I'm sure I'll need it in the not too distant future. Allen
#91590From: Don Curtis/SYSOPOct 30, 1987 10:24 PM
Allen, Unless they've re-typeset the book, the call is listed as: OpenLibrary(intuition.library) At least in my version of the book…if you'll look at the L in the word OpenLibrary (where it is upper case) and the l in intuition.library you'll see that they are indeed different. However, the font they are using does make it easy to confuse between the two unless you're carefull. Don
#91601From: Allen MittsOct 30, 1987 11:28 PM
(blush) you kow, I hadn't noticed that before! But you are right. The L's ARE different (but that lowercase 'l' sure LOOKS like an uppercase 'L'). Thanks for pointing this out. I'll have to be more careful (or they'll have to change their type style <smile>). Allen
#91714From: Ed SilvaOct 31, 1987 10:49 PM
Most of the times that I have been helped in this forum (lots of times…) i just try to do the same for someone else…in another words dont just try to give me a 'pay back' but rather help whenever you can help somebody. Ed
#91728From: Allen MittsNov 1, 1987 12:15 AM
Ed, I always enjoy helping others. That's one of the benefits of telecommunications! Allen
#91956From: Ed SilvaNov 3, 1987 3:55 AM
Ok. Ed Silva