FILENAME |
path = FILENAME AS STRING path = FILENAME( module AS MODULE ) AS STRING
FILENAME returns the file name, including path, of the file of current or specified module. Suppyling NULL as the module will return the name of the current MyBASIC2 interpreter DLL and suppling MB_APP_HANDLE as the module will return the name of the client application.
Example:
OPTION EXPLICIT ON OPTION VERSION 12.3
$INCLUDE "MyBASIC2.bis"
DIM s( 2 ) AS STRING s( 0 ) = "No" s( 1 ) = "Yes"
PRINT "Module: ";MODULE, PRINT "FileName: ";FILENAME, PRINT "Verson: ";VERSION, PRINT "Compiled: ";s( COMPILED ), PRINT NEW_LINE
PRINT "Module: ";MODULE( NULL ), PRINT "FileName: ";FILENAME( NULL ), PRINT "Version: ";VERSION( NULL ), PRINT "Compiled: ";"n/a", PRINT NEW_LINE
PRINT "Module: ";MODULE( MB_APP_HANDLE ), PRINT "FileName: ";FILENAME( MB_APP_HANDLE ), PRINT "Version: ";VERSION( MB_APP_HANDLE ), PRINT "Compiled: ";"n/a", PRINT NEW_LINE
DIM m AS MODULE LOAD "MyBASIC2_ExtLib.dll" AS m PRINT "Module: ";MODULE( m ), PRINT "FileName: ";FILENAME( m ), PRINT "Version: ";VERSION( m ), PRINT "Compiled: ";"n/a", UNLOAD m
|