nat4200 wrote:
Who are your posts for anyway?
You.
nat4200 wrote:
I thought the "Not exactly. For example, how many bytes are there in a long?" was directed at me
It was.
nat4200 wrote:
but if you think I "know full well the point [you were] making" without you you having made it, then why did it bear mentioning?
Because I assumed that you would understand that I wasn't asking for the number of bytes in a
long at least, but how many bytes are in a
long exactly. And now for some strange reason you have turned this into a pointless debate.
nat4200 wrote:
If you want an integer of specific size you should use the types defined in "stdint.h"
I know. In fact that was the very point I was going to make. The stdint.h header exists
because the language's built-in types differ across operating systems and compilers, which was the very point I was making that I assumed you would understand.
nat4200 wrote:
There are maybe three levels you can appreciate something like "__stdcall" on:
1. Recognising that it is non standard keyword; and recognising that as per the standard, symbols/keywords starting with a double underscore (or a single underscore and a capital letter...) are "reserved" for use by the implementation - eg. a program shouldn't define a variable,function or macro as "__FOO" (or "_BAR"...)
2. Understanding that it specifies a calling convention, and when you will need to use it working with an API or other 3rd party code
3. Understanding low level details, eg. how a program's stack and heap are used; and understanding what effect specifying a calling convention will have upon the function call.
I maintain that at most a book on learning C, aimed at beginners, should cover #1 above (ie. pointing out what names one shouldn't use for a variable/function/macro even if one's compiler may not give an error/warning).
I feel #2 should be covered in texts dealing with APIs that need the programmer to use non-standard calling conventions (eg. the Win32 API).
Who said anything about books aimed at beginners?
You said "the c language is the same regardless of what OS you learn on". You did not say "the C language does not differ across operating systems and compilers to the extent that it will have any bearing on a beginner learning the language".