http://f.osdev.org/viewtopic.php?f=11&t ... 846a70bcc6
I know the feeling... when using C. That has nothing to do with the language but how hardwired we can get to our language of choice. Try thinking in another language like German or french if you rarely speak it. Same problem.onlyonemac wrote:Yeah that doesn't mean that it's a good language. Frankly it's antiquated and it sucks, and every time I've tried to use it I just can't THINK straight!!!Kazinsal wrote:Fairly large chunks of classic Macintosh system software were written in Pascal, IIRC.
Pascal isn't antiquated in any way. Altho I wouldn't suggest using TP7 for a new project, just as I wouldn't suggest Visual C 1.0.
The free pascal compiler is up to date, compiles itself and is capable of everything C can do.
Which incoherencies? When trying to write pascal while thinking in C?onlyonemac wrote:there's no need to fuss with the incoherencies of a language like Pascal that was designed for a previous era.
Have you ever actually written anything in Pascal? It supports all calling conventions on a per procedure/function basis including cdecl, stdcall, fastcall etc.onlyonemac wrote:And once you've written everything in Pascal, you'll have to keep it that way or at least make a lot of changes to any code that you use that is written in other languages, as the calling style is significantly different from the ubiquitous C style.
Need an example on how to use them?
Procedure HelloWorld(); stdcall;
Procedure HelloWorld(); cdecl;
You can mix Pascal just fine with C, Go, Assembler and lots more. Fits like a glove, no problems what so ever.