Question: How to declare variables local with assign?

I need to declare a whole set of variables as local. The variable names are generates algorithmically using assign. Like so:

seq(seq(assign(cat(S,i,j)=Vector(datatype=float)),i=1..9),j=1..9);

Stand-alone, this works and creates all these Vectors for later use. But this:

local seq(seq(assign(cat(S,i,j)=Vector(datatype=float)),i=1..9),j=1..9);

does not work; I get an "error; '(' unexpected".

I really do not want to type all these by hand... on the other hand, if I do not declare these as local I get 99 warnings about implicit local declaration; not nice.

Is there a way to do this?

Thanks,

M.D.

PS: I do not upload as the one line really is all that is needed. At the lowest level one does not get the implicit-declaration warning, but with "local" it still fails.

Please Wait...