In programming, a dynamic variable is a variable whose address is determined when the program is run. In contrast, a static variable has memory reserved for it at compilation time.
Questions tagged [dynamic-variables]
262 questions
-1
votes
2 answers
Passing parameters of varying Types
I am using a procedure which involves parameter passing and the parameter being passed is a variable. Because I have explicitly declared the data type of another parameter, I need to do the same for this one. What data type do I declare the…

ohSkittle
- 149
- 3
- 14
-1
votes
4 answers
how to create and concatenate dynamic variables in PHP?
In this php code, during a while loop, I was hoping to use later 3 variables called $menu_1, $menu_2, and $menu_3. Is this possible in PHP?
while($parent_row = mysql_fetch_array($parent_result)){
$menu_ = "";
$menu_ . $i = "\n\t$('#menu_" .…

JoJo
- 4,643
- 9
- 42
- 65
-2
votes
1 answer
Building dynamic variables for menus in Python
I'm using an excellent menu structure function from Github which is powering a small LCD. The menus contain top (parent) elements and sub elements, and I want to build the sub-elements dynamically. Currently they're static and work like this:
top5 =…

Will
- 89
- 1
- 10
-3
votes
1 answer
How to use $scope.eval() in angularjs to set $scope variable
I'm trying to figure out how eval() works in AngularJS, but I can't seem get my head around it.
I have the following:
$scope.salaryRate, $scope.priceRate = {
number: undefined,
type: undefined,
from: undefined,
to: undefined,
…

Gjert
- 1,069
- 1
- 18
- 48
-3
votes
3 answers
Dynamic variable names in Java
I am reading from a comma seperated file and splitting the contents into an array. I am doing this in a while loop so I would want my arrays to have have a different name dynamically because the last line in the file end up overwriting my array…

fanbondi
- 1,035
- 5
- 18
- 37
-4
votes
0 answers
How to use dict values as already exist variables?
I have some vars and its values:
var1, var2, var3, var4 = 9, 8, 7, 6
I have dict:
map = {
1: 'var1',
2: 'var2',
3: 'var3',
4: 'var4',
}
I have some calculations and get number:
key = 2 # 1/3/4
Can I somehow change var (ex.…

ZoolooS
- 1
- 3
-4
votes
1 answer
How to name variables when reading from a custom config file with an unknown number of attributes? Java
In a project I am working with a custom configuration file to allow for custom cards to be loaded into a game. (similar to a .properties file except it holds information for more than one item, as well as different types of items).
File is set up…

Bpendragon
- 44
- 1
- 4