all tasks

This commit is contained in:
Ingy döt Net 2013-04-11 01:07:29 -07:00
parent b83f433714
commit 68f8f3e56b
14735 changed files with 178959 additions and 0 deletions

View file

@ -0,0 +1,24 @@
# At top level, global variables are declared when they are assigned, so one only writes
global_var := 1;
# In a function, local variables are declared like this
func := function(n)
local a;
a := n*n;
return n + a;
end;
# One can test whether a variable is assigned
IsBound(global_var);
# true;
# And destroy a variable
Unbind(global_var);
# This works with list elements too
u := [11, 12, , 14];
IsBound(u[4]);
# true
IsBound(u[3]);
# false
Unbind(u[4]);