Available on: all targets See also: IS NOT HAS BIT HAS NOT BIT

IS

This instruction allows you to check if a certain bit in a certain position (0 based) in a variable or expression is set to 0 or to 1. If that certain bit is set to 0, the instruction will return the value `FALSE`. Otherwise, the statement will return `TRUE`.

SYNTAX

 = value IS position


Legend
  • id : identifier
  • type : datatype
  • v : value
  • "..." : string
  • [...] : optional

EXAMPLE

 IF x IS 2 THEN: PRINT "bit 2 is 1!": ENDIF


Used in:

Any problem?

If you have found a problem with this keyword, if you think there is a bug or, more simply, you would like it to be improved, open an issue for this example on GitHub.
Thank you!

open an issue BACK TO KEYWORDS