|
#Abort | ||
#Abort Message$ | ||
Parameters: Message$ = The Message you want to display to the user in the abort pop up dialog |
||
Returns: NONE | ||
#Abort is a compile time directive that forces the compiler stop the compilation process. It's really only used when combined the #IF/#ENDIF directives. Since the #IF directives are calculated at compile time, this allows your source to evaluate any constant expressions (like settings) and conditions. So if an expression fails, you could use the #Abort directive to Pop an message (giving a reason) and stop the compile. Rather than allowing the compiler to keep building a project that will probably not run correctly. A common usage can occur when you've written a program using a current version of PlayBASIC that you know, won't compile in order versions. So #abort messages are perfect way to force the compiler to not bother compiling this code in older versions. Of course it's always helpful when the abort message tells the user the reason why compliation has been aborted. FACTS: * #Abort is a COMPILE time directive. If the compiler see the #Abort directive in your source, it will pop and message and stop compiling. Mini Tutorial: This example performs a compile time check using the #IF directive against the PlayBasic version constant. If the Constant (the version number) is greater than 1,(which is always will be) this will force the compilation of the code to stop via the use of the #abort directive.
No Output.
|
Related Info: | #ELSE | #ENDIF | #IF | #IFDEF | #IFNDEF | #Warn : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |