
local variable(+Name)

   Creates the untyped non-logical variable Name.

Arguments
   +Name               An atom.

Type
   Non-logical Variables, Arrays, Bags and Shelves

Description
   If Name is an Atom, a non-logical variable (visible only in the
   caller module) is created.  Its value is initialised to a free
   variable.  The contents of the variable persists across failures.
   The value of a non-logical variable can be changed with
   setval/2 and retrieved with getval/2.  Setting and retrieving terms
   from a non-logical variable involves copying the term each time. 
   In particular, if the term contains variables, they lose their
   identity and are replaced with fresh ones.

   Notes:

   Declaring a variable twice is silently accepted.

   It is possible to create variables with global visibility using
   global variable(A) but this feature will be removed
   in future releases.


Resatisfiable
      No.

Fail Conditions
      None.



Exceptions
     4 --- Name is not instantiated.
     5 --- Name is not an atom.

Examples
   
Success:
      local variable(a).
      local variable(count), variable(value).

Error:
      local array(X).                        (Error 4).
      local array(6).                        (Error 5).


See Also
   current_array / 2, array / 1, array / 2, decval / 1, incval / 1, bag_create / 1, getval / 2, setval / 2
