Hi guys, I want to ask about when I write a code, who's in charge of converting my code rows to the CBU for getting compiled and executed?!
sorry about that confusing question !
Hi guys, I want to ask about when I write a code, who's in charge of converting my code rows to the CBU for getting compiled and executed?!
sorry about that confusing question !
This is rather mind boggling: what material are you using to learn C? Didn't it explain to you why you have to use a compiler to compile your C code before you could run your program?
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
for example according to what I'm asking, how compiler know that "casting" is allowed and not allowed on PC ?!
Maybe I miss the understanding of program "COMPILER"
Because the C standard specifies what a cast looks like (syntax) and what it means (semantics), so when looking at your source code it is possible to determine if it is allowed. However, it is still possible that your cast conforms to C syntax and even semantics, but has a semantic error beyond what the compiler can determine, e.g., you cast an int to a pointer, which might be fine on some systems as long as it follows what is documented, but be nonsensical in others.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
You mean by semantics, it's just related to the language itself not related to the CBU operations? meaning the "CASTING" is an operational semantics related just and only to the language !
Moreover, could you please explain what is "compiler" mean? illustrate that please in aspect of what a programmer must know about it because everytime I want to write a code that thing baffled me in aspect of how compiler works!
thanks alot
CBU means crazy be user ?
Tim S.
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson
You're programming in C, not in assembly language or directly in machine language, so of course the semantics of what you are programming are for C, not for assembly/machine language, and hence do not have any direct relationship with CPU operations.Originally Posted by RyanC
Back the bad old days, you would be told to STFW. This really isn't hard to find, e.g., whatis.com entry for "compiler". If you really want to know in detail, then go learn about compiler construction; it is often part of an undergraduate computer science/software engineering university course.Originally Posted by RyanC
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)