[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Generating global variables locally

From: Vivek Shanmuganathan \(95410006-BS\)
Subject: Generating global variables locally
Date: Sun, 3 Oct 1999 22:15:35 +0530 (IST)


I am not sure whether I am going to ask a stupid question. Is it possible
to generate, from within a function, a large number of global variables
and assigning values to them? And, it should also be possible to destroy
those global names as and when required by calling a similar function.

For example:

function generate_global_vars(a_vector)
# a_vector is a vector whose size is unknown.

for val = ext

# Here I want to generate global variables 
# and assign values to them. The names and number of these global variables
# will be different based on the size and the value of the vector. For
# example, for a_vector = [10:5:30], I would like to create new global
# variables y10, y15, y20, etc.





Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see
Instructions for unsubscribing:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]