dao icon indicating copy to clipboard operation
dao copied to clipboard

Compound assignment doesn't work in the interactive mode

Open Night-walker opened this issue 10 years ago • 1 comments

(dao) (a, b) = (1, 2)
= ( 1, 2 )
(dao) a
[[ERROR]] in file "code string":
  At line 1 : Invalid expression --- " a ";
  At line 1 : Symbol not defined --- " a ";

Night-walker avatar Jun 29 '15 08:06 Night-walker

Actually it didn't stop working, just never worked in such mode.

Here a and b are automatically declared as local variables, which cannot be used in the following commands. Only global variables can be used across commands in interactive mode, where variables are usually automatically declared as globals.

Apparently we forgot to do the same for variables declared in compound assignments. Will be fixed.

daokoder avatar Jun 29 '15 09:06 daokoder