preventing_20a_20library_20from_20being_20run
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
preventing_20a_20library_20from_20being_20run [2018/03/31 13:19] – external edit 127.0.0.1 | preventing_20a_20library_20from_20being_20run [2024/01/05 00:21] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 2: | Line 2: | ||
//by Jon Ripley, July 2006, January 2007//\\ \\ To prevent a library from being run add the following code to the start of the library after any initial comment block to generate a syntax error when a user tries to run your library:\\ \\ | //by Jon Ripley, July 2006, January 2007//\\ \\ To prevent a library from being run add the following code to the start of the library after any initial comment block to generate a syntax error when a user tries to run your library:\\ \\ | ||
+ | <code bb4w> | ||
; | ; | ||
+ | </ | ||
\\ To generate a more descriptive error instead add the following code to the start of your library:\\ \\ | \\ To generate a more descriptive error instead add the following code to the start of your library:\\ \\ | ||
+ | <code bb4w> | ||
SYS " | SYS " | ||
QUIT | QUIT | ||
+ | </ | ||
\\ The message appears in a message box and the program will quit when it is dismissed. This necessarily adds 78 bytes to the library, even when added to a compiled program, but ensures that the library will not be executed and alerts users that the library is not an executable program. | \\ The message appears in a message box and the program will quit when it is dismissed. This necessarily adds 78 bytes to the library, even when added to a compiled program, but ensures that the library will not be executed and alerts users that the library is not an executable program. |
preventing_20a_20library_20from_20being_20run.1522502374.txt.gz · Last modified: 2024/01/05 00:17 (external edit)