On Wed, 12 Dec 2012, Allin Cottrell wrote:
On Wed, 12 Dec 2012, Sven Schreiber wrote:
> I have the problem that when I declare a bundle in a script and run the
> script a *second* time, I get the following error:
>
> ? bundle test
> Invalid declaration: maybe you need the "clear" command?
>
> Error executing script: halting
>> bundle test
That's by design. Declaring a variable of a given name more
than once is a scripting error (always has been). You can
redefine a variable OK, but you cannot re-declare it;
re-declaration probably means the writer has forgotten about a
variable. But the "clear" command is there if you need it, to
give yourself a tabula rasa.
Maybe it would be worthwile to introduce a syntax construct so to define
an empty bundle; something like
bundle foo = null
so that you can initialise a bundle in a code snippet and run it
potentially over and over without getting the error.
Thoughts?
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------