m3core/derived/Compiler.i3


 Copyright 1996-2000, Critical Mass, Inc.  All rights reserved. 
 See file COPYRIGHT-CMASS for details. 

This interface defines compiler-dependent features. They are <<EM>>not<</EM>> necessarily portable.

INTERFACE Compiler;

TYPE
  OS       = { POSIX, WIN32 };
  Platform = { AIX386, ALPHA_OSF, AP3000, ARM, DS3100,
               FreeBSD, FreeBSD2, HP300, HPPA, IBMR2,
               IBMRT, IRIX5, LINUX, LINUXELF, NEXT,
               NT386, OKI, OS2, SEQUENT, SOLgnu, SOLsun,
               SPARC, SUN3, SUN386, UMAX, VAX, FreeBSD3,
               FreeBSD4, FBSD_ALPHA, LINUXLIBC6, I386_DARWIN,
               PPC_DARWIN, BSDI4, NT386GNU, PPC_LINUX,
               AMD64_DARWIN, AMD64_LINUX, SPARC32_LINUX, SPARC64_LINUX,
               SPARC64_OPENBSD, PPC32_OPENBSD, MIPS64_OPENBSD,
               SPARC64_SOLARIS, I386_OPENBSD, AMD64_FREEBSD,
               PA32_HPUX, PA64_HPUX, ARM_DARWIN, I386_INTERIX,
               AMD64_NETBSD, AMD64_OPENBSD };

CONST
  ThisOS       = OS.POSIX;
  ThisOS_String  = "POSIX";
  ThisPlatform = Platform.AMD64_LINUX;
  ThisPlatform_String = "AMD64_LINUX";

PROCEDURE ThisFile (): TEXT;
Returns the name of the source file that called ThisFile. The result may be used as a compile-time constant.

PROCEDURE ThisPath (): TEXT;
Returns the fully qualified path of the source file that called ThisPath. The result may be used as a compile-time constant.

PROCEDURE ThisLine (): CARDINAL;
Returns the source line number where ThisLine was called. The result may be used as a compile-time constant.

PROCEDURE ThisException (): ADDRESS;
Returns a description of the exception currently being handled. This procedure may only be called inside an active TRY-FINALLY or TRY-EXCEPT handler. The returned value is an RT0.ActivationPtr.

END Compiler.