#C example problem
8 messages in this thread
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
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
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
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
(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
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
Ed,
I always enjoy helping others. That's one of the benefits of
telecommunications!
Allen