| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Help a beginner! |
TD>
> Additionally,
> I don't know of many beginner programmers who use multiple compilers
> (especially those who don't have lots of money). So portability
> across compilers would not seem to be an important issue in this
> case.
TD>
It is if they expect to use textbooks or to ask questions here in
OS2PROG.
The reason is that VIO is compiler-independent, and works the same for
*everyone*, both textbook writers and OS2PROG participants alike.
Whereas compiler-specific libraries such as the functions commonly found
in have traps and peculiarities that will catch the unwary.
If someone asks about putch() on Borland C++, for example, they are
going to be misled if someone answers based upon experience with putch()
on Watcom C++ or MetaWare High C++. Confusion results.
But if someone asks about KbdCharIn, then the answer is the same, no
matter what compiler, or language, is being used.
The same applies to textbooks. Many is the "how to program in C++"
textbook that is written that assumes that such compiler-dependent
functions as putch() work as they do on the author's C++ compiler, and
many are the complaints that are made when the example code either
doesn't compile or doesn't work when compiled with another C++ compiler.
( Many textbooks are particularly shortsighted and narrowminded in this
area, in fact. It always surprises me that people who use textbooks
and find that the examples don't work with their C++ compiler, their
make program, or their linker, then complain about the tools. The
fault is clearly with the textbook, not the tools. )
TD>
> As for the suggestion that using system calls is the most portable
> solution, I have to point out that the method of calling 16 bit (and
> all VIO calls are 16 bit) code from otherwise 32 bit code, does in
> fact vary according to compiler.
TD>
Nevertheless, the source will always be the same across all platforms,
and the behaviour of the system call will always be the same. What more
do you want ?
( The only known thunking problem, Paul Edwards' Borland structure
thunking bug, doesn't apply to VIO, since none of the VIO calls return
a 16:16 pointer to a structure. )
TD>
> While many of the compilers' library calls might be one to one
> translations of VIO calls, some might be a little less straight
> forward, [...]
TD>
Whilst the above is quoted from your discussion of reading the library
source as a guide to using system calls, it does, ironically, prove the
point that I am making. Not all libraries implement areas such as
in the same way, and the programmer who uses rather
than using the system API is asking to be both confused and frustrated
at the end of the day.
> JdeBP <
___
X MegaMail 2.10 #0:
--- Maximus/2 3.01
* Origin: DoNoR/2,Woking UK (44-1483-725167) (2:440/4)SEEN-BY: 50/99 270/101 620/243 711/401 409 410 413 430 808 809 934 955 SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809 @PATH: 440/4 141/209 270/101 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.