#LATTICE_C_4.0
9 messages in this thread
Certainly I do :-> If you have any questions, I will be more than happy to
answer them.
First of all:
What is wrong with this program, that it REFUSES to compile?
main(){
int a,b,c,sum;
a=b=c=sum=0;
sum=a+b+c;
printf("Sum=%d\n",sum) }
=>c.j.<=
There's no ";" after the printf("Sum=%d\n",sum) statement. and there's no void
statement, so you need a return(sum) or something, or else you need the void;
That's all _I_ see. <grin>. any one of those would break it.
Do you know of any online tutorials that are capatible with Latticethat I can
download? =>c.j.<=
Nope; don't know of any tutorials at all, for that matter. Now, that having
been said, you could try most of the source in DL10 – a great deal of it (most,
I think) was written using Lattice. Some of it was made for the (ugh) MANX
compiler, but it's usually marked that way… Although, due to style problems
(sometimes) and due to actual mistakes (sometimes) in how the system is
handled, you can certainly study this stuff for help and so on. Hope that gives
you something to go on…. otherwise, can't help you. –Ben–
Certainly, I am more than willing to scribble together online notes about any
particular problem area. If you have some specific questions I can answer them
much more quickly.
John, it's nice to see you on the AmigaForum. Now for a quick
question. Does the #pragma statement support generating inline code for
calling my own assembly routines? I am currently using stubs for
interfacing these to C, but it would be nice if 4.0 could generate the
inline code for calling these so I could eliminate the stubs. On another
note, I was wondering if you could upload a listing of any bugs, problems,
and or fixes for version 4.0 of Lattice that may have arisen since it was
released.
CJ,
We have a tutorial by Brian Kernighan, who inflicted… er brought us C, in
DL 10. It's called CTUTOR.ARC
Regards, Larry.
Some compilers won't complain about the lack of void on main; Manx, for
example, doesn't gripe about it (though I fail to understand why).
I have also heard that some compilers get really upset with the structure
a=b=n in a declaration. Dunno which ones, though. That shouldn't affect
this code however; I'm talking about "int a=b=c=0;", not "a=b=c=0;".