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 };

CONST
  ThisOS       = OS.POSIX;
  ThisOS_String  = "POSIX";
  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.