BlitzCoder Essentials
•
Home Page
•
About BlitzCoder
•
Contributors
•
Terms of Use
•
Email Us
Main Areas
•
BlitzCoder Chat
•
Discussions
•
Articles/Tutorials
•
Code Database
•
Link Database
•
Showcase Area
•
Worklogs
•
Competitions
Special Areas
•
Undocumented
Other Blitz Sites
•
Blitz Basic Home
•
Blitz Showcase
•
BlitzPlay Library
Forum Login
Username:
Password:
•
Register Now!
BlitzCoder Code Archives Page
Main Codes Page
"Constant false conditions will not be compiled"
, by thechange
All IF statements including a resulting constant false condition will be excluded from a compiled Blitz program.
Code
;------------------------------------------------------------------------------; ; A good purpose for this is debugging, for example having a Debug% flag. ; Here's an example: Const Debug% = True If Debug Color 255, 0, 0 Else Color 0, 0, 255 EndIf Text 0, 0, Debug ; In the above example, the compiled program would only contain this: Const Debug% = True Color 255, 0, 0 Text 0, 0, Debug ; But if Debug% were False: Const Debug% = False Color 0, 0, 255 Text 0, 0, Debug ; So you can safely implement constant conditions without having to worry about ; additional CPU time lost for calculations. ;------------------------------------------------------------------------------;
Copyright(c) 2000-2004, BlitzCoder. All Rights Reserved.
Code software created by Krylar's Kreations