Pooh program example 04-multi-assign.p

Test 04-multi-assign.p

Source of programm

# test multi value assignment 

a = 42
b = 1

[a , b ] = [b , a]

print( ~msg 'a [ a ] b [ b ]' )


Standard output for 04-multi-assign.p

a 1 b 42

Trace output for 04-multi-assign.p

003|a = 42
004|b = 1
006|[ a:-> 1 , b:-> 42]  = [ b:1 , a:42] 
008|print( ~msg 'a ' .. a:1 .. ' b ' .. b:42 .. '' )...