News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Why does resource-file need to contain systemconstants?

Started by laskar01, June 29, 2012, 07:38:07 PM

Previous topic - Next topic

dedndave

how 'bout...
"AsLittleCasPossible"
or...
"TheLessCtheBetter"
or, if you like short...
"IH8C"

:P

NoCforMe

Except that I don't really H8 C. (I just pity the poor C programmer ... nah, not really.)

Maybe I should use "I [heart] ASM" or something. (Vanity license plate?)

dedndave

CsuX   :lol:

how about a bumper sticker....
"Honk if you hate C"
or
"My other language is Assembler"

xanatose

The reason is that M$ decided it to be so. The Borland resource compiler didn't need the headers.

However, given that windows have evolved, I think that M$ did the right thing.

hutch--

While I confess I am getting rusty with C, I don't have this religious fervor when it comes to writing code and if you use Windows, you are using a hell of a lot of code written in C and to a lesser degree, C++.

Now if this was a Unix forum, you would have the devotees frothing at the mouth over such heresies as not bowing down and worshipping the great god of C and they would be devising a Holy War against such infidels such as banishing you to a JAVA forum so that you could not partake of the religious virtues handed down by the great god of C. Now if the transgression was extreme enough, even the JAVA gods would be offended and they would in turn banish you to a HTML forum.

Fortunately for such infidels, Microsoft could not care less as long as you BUY Windows and even if you utter great and terrible heresies such as not worshipping the great god of C, you can always join the MASM forum.  :P

NoCforMe

Honestly, when it comes to programming languages, I'm not religious either. Not zealously in favor of assembly language, not a h8r of higher-level languages like C.

Ackshooly, C is about as close to assembly language as you can get; it's actually pretty low-level as so-called HLLs go. Some statements actually map 1-to-1 to assembly code. Others are so close that it hardly matters. Plus for those people who use the high-level constructs in MASM32, like if/elseif, loops, etc., the code that actually gets generated isn't a whole lot different than the corresponding C constructs. It all gets boiled down to jumps, dontcha know.

I used to write COBOL, a language much maligned in the programmer "community". However, I still say that it was the best tool to use for the jobs I was tasked with doing. To all the detractors of COBOL, I challenge them to write an understandable and, more importantly, maintanable payroll application in C++, Pascal or whatever.

mywan

I may be awfully green in assembly but this question has an obvious answer to me. I got accustomed to using the values directly, without the named variables, a lot in high level scripting languages. Especially given that some of these scripting languages don't even strip the unused portions of the includes. That leaves an awful lot of orphaned globals in the name of adhering to standards of waste.

In fact not even the resource compiler knows the constants by number. It merely passes on whatever number you provide for windows to make sense of. Windows can also directly interpret certain named arguments, but many parameters require the number itself.

In effect the question is a bit like asking why you need a phone book when the phone company already knows everybody's phone numbers. In this case the phone numbers are to call the right department in windows to get windows resources allocated to your program. If you want to use numbers instead of names you need no include for the names, but that doesn't mean the compiler knows what they mean either. Only windows knows when they are passes uninterpreted (unchanged) to windows.