//by Jon Ripley, January 2006//\\ \\ //BBC BASIC for Windows// provides no built in function to check whether a library has been loaded into memory using the **INSTALL** command. \\ \\ The following routine **FN_IsInstalled(lib$)** implements a method to check if a library is currently **INSTALL**ed:​\\ \\

+

//by Jon Ripley, January 2006//\\ \\ //BBC BASIC for Windows// provides no built in function to check whether a library has been loaded into memory using the **INSTALL** command. \\ \\ The following routine **FN_IsInstalled(lib$)** implements a method to check if a library is currently **INSTALL**ed:​\\ \\ <code bb4w>

DEF FN_IsInstalled(lib$)

DEF FN_IsInstalled(lib$)

IF ?HIMEM = 0 THEN = FALSE

IF ?HIMEM = 0 THEN = FALSE

Line 18:

Line 18:

ENDWHILE

ENDWHILE

UNTIL (!P% AND &​FFFFFF) = &FFFF00

UNTIL (!P% AND &​FFFFFF) = &FFFF00

-

= FALSE

+

= FALSE </​code>​

-

\\ To check if a library is installed use code similar to the following:​\\ \\

+

\\ To check if a library is installed use code similar to the following:​\\ \\ <code bb4w>

\\ When you [[http://​www.bbcbasic.co.uk/​bbcwin/​manual/​bbcwin5.html#​install|INSTALL]] a library, //BBC BASIC for Windows// checks whether that library is already installed (version 5.91a or later only), however it performs a case-sensitive comparison of the supplied path/​filename. It will reliably detect the **same** INSTALL statement being executed a second time, but not necessarily a **different** INSTALL statement which installs the same library but specifies it differently.\\ \\ Installing a library more than once is safe but wastes memory. If this is a concern, the following routine can be used instead of **INSTALL**:​\\ \\

+

\\ When you [[http://​www.bbcbasic.co.uk/​bbcwin/​manual/​bbcwin5.html#​install|INSTALL]] a library, //BBC BASIC for Windows// checks whether that library is already installed (version 5.91a or later only), however it performs a case-sensitive comparison of the supplied path/​filename. It will reliably detect the **same** INSTALL statement being executed a second time, but not necessarily a **different** INSTALL statement which installs the same library but specifies it differently.\\ \\ Installing a library more than once is safe but wastes memory. If this is a concern, the following routine can be used instead of **INSTALL**:​\\ \\ <code bb4w>