checking_20if_20a_20library_20is_20installed
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
checking_20if_20a_20library_20is_20installed [2018/03/31 13:19] – external edit 127.0.0.1 | checking_20if_20a_20library_20is_20installed [2024/01/05 00:22] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
=====Checking if a library is INSTALLed===== | =====Checking if a library is INSTALLed===== | ||
- | //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: |
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 & | UNTIL (!P% AND & | ||
- | = FALSE | + | = FALSE </ |
- | \\ 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: |
IF FN_IsInstalled(@lib$+" | IF FN_IsInstalled(@lib$+" | ||
PRINT " | PRINT " | ||
ELSE | ELSE | ||
PRINT " | PRINT " | ||
- | ENDIF | + | ENDIF </ |
\\ To list all installed libraries call **FN_IsInstalled(" | \\ To list all installed libraries call **FN_IsInstalled(" | ||
===== Installing a library only once ===== | ===== Installing a library only once ===== | ||
- | \\ When you [[http:// | + | \\ When you [[http:// |
DEF PROC_InstallOnce(lib$) | DEF PROC_InstallOnce(lib$) | ||
IF NOT FN_IsInstalled(lib$) THEN INSTALL lib$ | IF NOT FN_IsInstalled(lib$) THEN INSTALL lib$ | ||
- | ENDPROC | + | ENDPROC |
checking_20if_20a_20library_20is_20installed.1522502349.txt.gz · Last modified: 2024/01/05 00:18 (external edit)