Win32Platform
Moduł: SysUtils
var Win32Platform: Integer = 0;
Zmienna globalna określa rodzaj systemu operacyjnego na którym uruchamiany jest program. Możliwa wartość zmiennej:
VER_PLATFORM_WIN32s
- Windows for Workgroups z WIN32sVER_PLATFORM_WIN32_WINDOWS
- Windows 95VER_PLATFORM_WIN32_NT
- Windows NT
Przykładowe użycie:
program Bar;
{$APPTYPE CONSOLE}
uses
Windows, SysUtils;
var
S : String;
begin
case Win32Platform of
VER_PLATFORM_WIN32s: S := 'Win 3.1';
VER_PLATFORM_WIN32_WINDOWS: S := 'Windows 95';
VER_PLATFORM_WIN32_NT: S := 'Windows NT';
end;
Writeln('System to ' + S);
Readln;
end.
Stałe wykorzystane w programie zadeklarowane są w module Windows