Xojo Documentation Xojo Documentation
  • Home
  • Get Started with Xojo
  • QuickStarts
  • Tutorials
  • Pi Programming
  • More Guides
  • Resources
  • User Guide
  • Language Reference
  • Release Notes
  • System Requirements
  • Deprecations
  • Videos
  • Feedback
  • Usage
  • Copyrights and Trademarks
  • What links here
  • Related changes
  • Special pages
  • Printable version
  • Permanent link
  • Page information
  • Log in
  • Xojo Documentation
  • Home
  • Get Started with Xojo
  • QuickStarts
  • Tutorials
  • Pi Programming
  • More Guides
  • Resources
  • User Guide
  • Language Reference
  • Release Notes
  • System Requirements
  • Deprecations
  • Videos
  • Feedback
  • Usage
  • Copyrights and Trademarks
  • What links here
  • Related changes
  • Special pages
  • Printable version
  • Permanent link
  • Page information

Only Boolean Constants can be Used with If

From Xojo Documentation

Error message

Only Boolean constants can be used with #If...#Endif statements.

Sample Code

A 'regular' Boolean variable cannot be used as shown here.

Var b As Boolean
b = True
#If b Then
Beep
#Endif

See Also

DebugBuild, XojoVersion, XojoVersionString, TargetBigEndian, TargetDesktop, TargetLinux, TargetLittleEndian, TargetMachO, TargetMacOS, TargetWindows constants; #If statement.

Retrieved from "http://docs.xojo.com/index.php?title=Only_Boolean_Constants_can_be_Used_with_If&oldid=78036"
Category:
  • Errors Error Messages
  • This page was last edited on 23 March 2021, at 14:40.
  • Privacy policy
  • About Xojo Documentation
  • Disclaimers
  • Send Doc Feedback
  • Docs for the Xojo programming language and IDE
  • Powered by MediaWiki