Skip to content

Variables

Jean Dubois edited this page Jan 1, 2022 · 21 revisions

Definition

  • var identifier = expr : identifier is now expr
  • var identifier = var foo = expr : identifier and foo are now expr
  • Reserved variable names :
    • null (0)
    • True (1)
    • False (0)
    • None (a NoneType instance)
    • noug_version (depending the version, str type).
  • A variable definition return the expr given so it can be used in mathematicals operations : 1 + (var foo = 2) retuns 3

Access

  • Just give the identifier : foo

Types

There is 4 types :

  • int (integers)
  • float (floats)
  • str (strings)
  • NoneType (None)

Examples

  • var foo = var bar = 12
  • while var foo = bar - 1 then var bar = bar - 1
Clone this wiki locally