qp.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
DOSV.PAS
  Example Contents Index                                    Back
 
PROGRAM dosv;
 
{ DOSV.PAS illustrates the following routines:
 
      Concat    DosVersion    Hi    Lo    Str
}
 
USES
    Dos;
 
CONST
    program_name = 'DOSV ';
    program_desc = 'retrieves the current DOS version number.';
    notice       =   'You are using DOS version ';
 
VAR
    version         : Word;
    info_str        : STRING;
    lo_str, hi_str  : STRING;
    vers_str        : STRING;
 
BEGIN
 
    Writeln( program_name, program_desc );
    Writeln;
 
    { Get current DOS version number. The high byte holds the minor
      version number, and the low byte holds the major version number.
    }
    version := DosVersion;
    Str( Lo( version ), lo_str );
    Str( Hi( version ), hi_str );
    vers_str := lo_str + '.' + hi_str;
 
    { Concatenate these with a message. Note that the concat function
      is equivalent to the '+' operator above.
    }
    info_str := Concat( notice, vers_str, '!' );
    Writeln( info_str );
 
END.