[comp.os.os2] Major version number

gords@sunray.UUCP (Gord Smith) (11/08/89)

First let me say that I think it's great to have Microsoft people responding to
questions on this newsgroup.

In article <8616@microsoft.UUCP> donh@microsoft.UUCP (Don Hacherl) writes:
>Divide by 10.  The "major version" of 2.0 will be encoded as 20.
 
>The factor of 10 difference between "true" and "displayed" major
>version numbers was added so that the version number of the earliest
>version of OS/2 (sensibly named 1.0) would appear greater than the
>latest version of DOS.  This is so that if a DOS app running in the
>3xBox queries the version number, it will see a high number and assume
>that its favorite recently added DOS feature is present.  Many DOS
>apps query the OS version and refuse to run on DOS 1.x, because those
>versions did not support handle based file I/O.  One small step for a
>version number, one giant leap for compatibility.

One would assume that this has been thought of, but what about the following
scenario?

"SuperDosApp" is running under OS/2 1.2 and wants to use the AutoWhatsis
feature added in DOS 6.0.  It queries the OS and finds the "true" major version
number to be 10, much higher than the 6 it requires.  Since OS/2 1.2 is already
released, one would assume it doesn't contain the wonderful AutoWhatsis feature
(left to your imagination) contained in DOS 6.0.  SuperDosApp then tries to use
the new feature, and proceeds to crash wildly in a blaze of VGA graphics and
disk-grinding.

Or, is it up to any writers of new Dos apps to check that:

if (true_major_version >= OS2_VERSION_REQUIRED ||
    true_major_version >= DOS_VERSION_REQUIRED && true_major_version < 10)
{
    AutoWhatsis();
}
else
{
    Kaboom();
}

Inquiring minds...

-- 
D. Gordon Smith         Voice: (613) 738-1338 ext 6118       P.O. Box 9707
Cognos Incorporated       FAX: (613) 738-0002                3755 Riverside Dr.
uucp: gords@cognos.uucp || uunet!mitel!sce!cognos!gords      Ottawa, Ontario
"Got room for a beer, Norm?" "No, but I'm willing to add on!"CANADA  K1G 3Z4