Library_Exists

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Core Language > BuiltIn Functions > General functions >

Library_Exists

 

Description

 

Check if a library exists returning full library path.

 

Syntax

 

Library_Exists[ ( sLibName [, KeepLibLoaded ]) ]

 

Returns

 

String. Full library path if library was found.

 

Parameters

 

Name

Type

Optional

Meaning

sLibName

String

No

The name of the library. Just the name, no path

KeepLibLoaded

Number

Yes

If %TRUE, after checking, the library will not be closed but left loaded.

 

Remarks

 

To check if a library exists, Library_Exists function search the library in a predefined sequence:

 

APP_PATH & LibName

APP_PATH & "Lib\" & LibName

APP_PATH & "Bin\" & LibName

APP_PATH & "Mod\" & LibName

 

APP_PATH & "Lib\" & sFileNameWithoutExtension & "\" & LibName

APP_PATH & "Bin\" & sFileNameWithoutExtension & "\" & LibName

APP_PATH & "Mod\" & sFileNameWithoutExtension & "\" & LibName

 

SystemDirectory & "\" & LibName

WindowsDirectory & "\" & LibName

 

CURDIR$ & "\" & LibName

 

APP_SCRIPTPATH & LibName

APP_SCRIPTPATH & "Lib\" & LibName

APP_SCRIPTPATH & "Bin\" & LibName

APP_SCRIPTPATH & "Mod\" & LibName

 

APP_SCRIPTPATH & "Bin\" & sFileNameWithoutExtension & "\" & LibName

APP_SCRIPTPATH & "Lib\" & sFileNameWithoutExtension & "\" & LibName

APP_SCRIPTPATH & "Mod\" & sFileNameWithoutExtension & "\" & LibName

 

Restrictions

 

See also

 

Examples