[GRASS-dev] Re: grass-dev Digest, Vol 23, Issue 112
Ivan Shmakov
ivan at theory.asu.ru
Sun Mar 30 14:17:48 EDT 2008
>>>>> Michael Barton <michael.barton at asu.edu> writes:
>> The lines marked ``>'' below seem nonsensical to me. For what
>> reason, e. g., would one need to assign to an `array' variable
>> thrice, let alone introducing the `#' variable?
[...]
>> barscale.tcl 15 > variable array lfile # scale
[...]
> Ivan,
> Everything following the # is a comment to document the variable
As Glynn had already pointed out, it isn't.
> The "variable xxx"
> is to assign this to a local namespace.
But note that there's no `variable array VARN' form. I guess,
the intended effect could be achieved by something like:
variable VARN
array set VARN { }
Or, introducing a new procedure:
proc var-array { varn } {
uplevel 1 [ list variable $varn ]
uplevel 1 [ list array set $varn { } ]
}
...
var-array VARN
[...]
More information about the grass-dev
mailing list