BASIC operator extensions

From BeebWiki
Revision as of 18:06, 19 February 2024 by Jgharston (talk | contribs) (Initial page.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
val  *  val         Multiplication
val  +  val         Addition or string concatenation
val  -  val         Subtraction
val  /  val         Division
val  ^  val         Raise to power
val  <  val         Less than
val  <= val         Less than or equal
val  <> val         Inequality
val  =  val         Equality
val  >  val         Greater than
val  >= val         Greater than or equal
val  << val         Shift left
val  >> val         Shift right signed
val >>> val         Shift right unsigned
 
val DIV val         Integer division
val MOD val         Modulus
val AND val         Bitwise AND
val EOR val         Bitwise exclusive-OR
val OR  val         Bitwise OR

?val                8-bit indirection
!val                32-bit indirection
|val                40-bit indirection
variable?val        8-bit indirection
variable!val        32-bit indirection
variable|val        40-bit indirection

variable  *=  val   Multiplication
variable  +=  val   Addition or string concatenation
variable  -=  val   Negation or subtraction
variable  /=  val   Division
variable DIV= val   Integer division
variable MOD= val   Modulus
variable AND= val   Bitwise AND
variable EOR= val   Bitwise exclusive-OR
variable OR=  val   Bitwise OR