Questions tagged [variable-names]
256 questions
-1
votes
1 answer
Automatically create variables names for future assignment in R
I need to create potentially a huge number of variables. I would like to name them
var.1, var.2, var.3 etc.
I am thinking about using a for loop. To experiment, I use only a single iteration, i.e. i=1. I've tried paste() and print(), but neither…

wen
- 1,875
- 4
- 26
- 43
-1
votes
1 answer
How to get inputname of variable passed into function through cellfun?
I know that the custom function myfun outputs the variable names that are passed to it using the inputname command.
However, when I pass variables through a cellfun the inputname command ceases to work, as shown below (where I am passing in the…

InquilineKea
- 891
- 4
- 22
- 37
-1
votes
1 answer
Iteration of columns for linear regression in R
I try to select columns in order to make a linear regression.
I tried to make something like this but it does not seems to work
df <- 0
x <- 0
for(i in 1:30){
reg.A_i <- lm(log(match("A", i, sep="_"))~ log(A_0) + B + C , data=y)
x <-…

Arnaud
- 15
- 5
-2
votes
2 answers
How to get the original name of loop variables in JavaScript?
In the following example code, the function "getOriginalName" does not exist, but that is what I am looking for:
for(let variable of [var1, var2, var3]) {
console.log("Value: " + variable);
console.log("Name: " +…

julvanu
- 13
- 3
-2
votes
1 answer
Strange variable names
I have found this in a JavaScript source code file:
function getElementsByClass(_0x62cbx2, _0x62cbx3, _0x62cbx4) {...
How can I translate _0x62cbx2, _0x62cbx3, _0x62cbx4 in the correct variable names?

xRobot
- 25,579
- 69
- 184
- 304
-2
votes
1 answer
What is the 'ctr' variable in a parallel C# loop?
I recently used a Parallel.For loop (see code below) in a small C# program and I'm a little perplexed by the ctr variable. Every example I've seen so far has the name of this variable set to ctr, but I cant seem to find any good resource on what it…

Zelyson
- 9
- 1
-2
votes
2 answers
How can I declare variables with illegal names (such as "int double = 0")?
I have tried to do this but I'm unable. How can i declare a number of variables with legal and illegal names (such as int double = 0;), so that you can see how the compiler reacts.

Kashif
- 11
- 1
-2
votes
5 answers
Are constant identifiers treated differently in C++?
As we know the value of constant variable is immutable. But we can use the pointer of constant variable to modify it.
#include
int main()
{
const int integer = 2;
void* tmp = (void*)&integer;
int* pointer = (int*)tmp;
…

stamaimer
- 6,227
- 5
- 34
- 55
-3
votes
1 answer
Type name choosing :: An Interface name for functions returning a value
It's always hard to choose better variable/Type names. I am stuck choosing a name for an interface
I want to classify functions based on whether they return values or not. Here are some choices I made and why I rejected them.
ReturningFunction : a…

Madhusoodan P
- 681
- 9
- 20
-3
votes
1 answer
php foreach as change variable names
Can I change the variable names used in foreach in PHP?
foreach ($sql2htmlLists as $kkkkk => $vvvvv){
instead of the default:
foreach ($sql2htmlLists as $key => $value){
Thank you

NicoESIEA
- 499
- 1
- 6
- 23
-3
votes
1 answer
How to call variable with input string
This is my problem:
I want to make a input that will run the name of the variable that is input.
var = "working!"
cmd = input(":")
#I want it so that the user inputs "var", the var variable ("working!") is printed.
#But if I put the print like it is…

SamtheMan
- 111
- 3
-4
votes
2 answers
Variable name with using pointer
I want to pick from keyboard which array i want to display (i know my code doesn't work i just want to show my problem)
int main(){
char *a = new char[5];
char *b = new char[5];
char name;
cin >> a;
…

Rooster
- 13
- 3
-4
votes
2 answers
Is there any advantages of defining variable names as __00000001 in C / C++
Is there any advantages of defining variable names as __00000001, __00000002, etc.?
Example:
int __00000001, __00000002 = 0;
for (__00000001 = 0; __00000001 < 10; __00000001++) {
__00000002 = __00000002 + __00000001;
}
...
Update: this is…

Eric Stdlib
- 1,292
- 1
- 18
- 32
-4
votes
1 answer
how to transform a string in a variable name ? python
how can I transform a string in a variable name ?
I have multiple variable value1, value2, value3 and value1 = 5
when i use
x = 1
print(str("value" + str(x)))
it return "value1" and not "5"
edit: it isn't a duplicate because i am asking how to…

l.b.dev
- 151
- 3
- 10
-4
votes
2 answers
What's "ambiguous" here and how do I fix it?
I'm told to write a function that would check if the punctuations in a string are all spaces. i.e.:
haskell> f "Hello my name is Brad"
True
haskell> f "Hello my name is Brad!"
False
I wrote an auxiliary function as follows,
import Data.Char
isPunc…

Brad
- 133
- 3