Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
runtime = %SYSID
The variable to be loaded with the system code of the current runtime: (a or n)
004 = IBM AIX 32‑bit
020 = Oracle Solaris 32‑bit
028 = Linux 32‑bit
101 = Windows 32‑bit
104 = Windows 64‑bit (x64)
200 = HP OpenVMS Alpha
202 = HP OpenVMS I64 and VSI OpenVMS
304 = IBM AIX 64‑bit
320 = Oracle Solaris 64‑bit (SPARC)
428 = Linux 64‑bit (x64)
509 = HP‑UX 64‑bit (Itanium)
%SYSID is evaluated at compile time as a literal value corresponding to the system where the source code is compiled. This allows it to be used for conditional compilations. For example, if a program is compiled on 32‑bit Windows and run on Linux, the return value would be 101 for 32‑bit Windows.
In Synergy .NET, the platform being targeted (e.g., ‑platform=x86) is irrelevant. %SYSID will return 101 or 104 depending on the compiler in use (32‑bit or 64‑bit).
The example below writes “Program compiled for Alpha VMS” if the source code is being compiled on HP OpenVMS Alpha.
.if (%SYSID .eq. 200) writes(1, "Program compiled for Alpha VMS")
The following example writes “Program not compiled for this machine” if the machine on which the program is currently running does not have the same system ID as the machine on which the source code was compiled.
xcall envrn(system, machine) if (machine .ne. %SYSID)
writes(1, "Program not compiled for this machine")