The platform function

Description

The platform function returns a value that indicates the operating system platform that the program is running on. NOTE: Actually the value returned by this function indicates the edition of Irie Pascal that is executing the program. The type of the value returned by this function is always integer, and is one of the platform constants.

Parameter

None.

Example

For example the program below uses the platform function to display the name of the platform it's running on.

   program ShowPlatform(output);
   begin
      case platform of
      platform_dos: writeln('DOS');
      platform_os2: writeln('OS/2');
      platform_win32: writeln('Windows');
      platform_linux: writeln('Linux');
      platform_fbsd: writeln('FreeBSD');
      platform_solaris: writeln('Solaris/x86');
      platform_solaris_sparc: writeln('Solaris/Sparc');
      platform_error: writeln('Unknown Platform');
      end
   end.

Portability

Operating Systems: All
Standard Pascal: No