let

:

set symbol to given value


Parameters

let symbol :string :word :literal :block
    value :any

Returns

  • :nothing

Examples

copy
let 'x 10 ; x: 10 print x ; 10

copy
; variable assignments "a": 2 ; a: 2 {_someValue}: 3 print var {_someValue} ; 3

copy
; multiple assignments [a b]: [1 2] print a ; 1 print b ; 2

copy
; multiple assignment to single value [a b c]: 5 print a ; 5 print b ; 5 print c ; 5

copy
; unpacking slices and multiple assignment [a [b] d c]: [1 2 3 4 5] print a ; 1 print b ; [2 3] print c ; 4 print d ; 5

copy
; tuple unpacking divmod: function [x,y][ @[x/y x%y] ] [d,m]: divmod 10 3 ; d: 3, m: 1

Related