boolean, data type

The boolean data type is supported by Envision:

a = true
b = not a // false
c = a and b // false
d = a or b // true
show summary "" with a, b, c, d

The keyword boolean appears in user-defined functions:

def pure myXor(a : boolean, b : boolean) with
  return (a and not b) or (not a and b)

show scalar "" with myXor(true, false) // true

and in read blocks:

read "/sample.csv" as Sample with
  MyBoolean : boolean
User Contributed Notes
0 notes + add a note