Questions tagged [variable-names]
256 questions
0
votes
1 answer
Can loop variables be used multiple times in Verilog?
I have two arrays that look like this:
reg [3:0] foo [31:0];
reg [7:0] bar [63:0];
They need to be initialized in an always block as follows:
integer i;
integer j;
always @(posedge clk) begin
if(reset) begin
for(i=0; i<32; i=i+1) foo[i] <=…

Eli
- 11
- 4
0
votes
0 answers
Creating variables with different numbers in their names through a function
I'm working on an assignment and I'd like to optimise my code a little. Basically what I'm doing is reading .xlsx files which have three sheets each. For context - One is "Insurance info", second is "New insurances", third is "resignations". The…

Qbk
- 23
- 5
0
votes
2 answers
C++ variable names (can declare main as variable however same is not true for other functions name)
we are able to declare the main keyword as a variable name(without an error); however, the same is not true for other functions(i.e. user defined functions). Why is this?
Thank you.
(a code using a user defined function and the same variable name…

bumbum
- 11
- 2
0
votes
1 answer
CSV file without column name & SAS Load file - Can I make use of the load file in R?
Is there a way I can make use of the SAS load file (see sample below) in R?
DATA NEDS_2017_Core;
INFILE "&path\NEDS_2017_Core.csv" dsd dlm=',' LRECL = 395;
/* Define data element attributes */
ATTRIB
AGE LENGTH=3
…

Quantitative72
- 33
- 3
0
votes
2 answers
Create a variable with a value that is the name of another variable in R
In R, how can you create a variable that it's value is the name of another variable?
For example: I have the vector groupers:
groupers <- c("Epinephelus.costae", "Epinephelus.marginatus",
"Mycteroperca.rubra", "Serranus.cabrilla",…

Shira S
- 3
- 1
0
votes
1 answer
Sort a dataframe by columns with their names passed as vector
I need to sort multiple dataframes by a list of columns with non-alphabetic characters in their names. For a single dataset I'd use this famous solution with a workaround for blanks and stuff in the variable name:
df_sorted = df[with(df,…

Dmitry D. Onishchenko
- 145
- 2
- 12
0
votes
1 answer
Javascript array variable when named "name" showing unexpected result when storing strings
I am writing a very simple code for storing strings in an array and then splitting it but apparently the "variable name" seems to have an impact on the results.
I have tried this on Google Chrome console as well as Microsoft edge. Results are the…

Asif
- 23
- 6
0
votes
0 answers
variable names in C by Dennis Ritchie
I just started reading C by Dennis Ritchie and in the second chapter, I went through the page which I attached as an image where I didn't understand the first line of the second paragraph can someone help me with it.

Haricharan Reddy
- 55
- 2
- 9
0
votes
1 answer
How to check if a string is a valid variable name in Python?
I would like to get some reusable code to correctly determine whether or not a string is a valid variable name in python3 (or the currently-running python would suffice).
For example:
If given the string group_찇籸딥햳㸙濮ᚨ麍ڵថ, the method that solves this…

AlanSE
- 2,597
- 2
- 29
- 22
0
votes
1 answer
Create a variable with the name coming from a string variable
I have a class say class A and a string variable string name = "student". I want to create an instance of class A with the object name as student say class A student;
But i don't know the name of object prior; I have the object name present in the…

LoneWolf97
- 21
- 2
0
votes
1 answer
Threading the needle: finding the name of the actual argument corresponding to a formal of an outer function
The function strip() below tries to produce a brief report on the result of its operation via the tee pipe (%T>%). Because this function is in turn being handed to a wrapper function and then to purrr::pwalk, which will supply it with a bunch of…

andrewH
- 2,281
- 2
- 22
- 32
0
votes
1 answer
What is the pCrawl variable referring to in Trie code?
Various sites like this one use a pCrawl variable to keep track of where a pointer is in the Trie data structure. I can see why the "crawl" part of the variable makes sense, if this means that the variable is "crawling" around the tree... but what…

JacobIRR
- 8,545
- 8
- 39
- 68
0
votes
1 answer
JavaScript name variable
I'm using Mozilla Firefox if that changes anything.
So I was developing a website, an accidentally set name variable to my name in some code, and then I fixed that. Shortly after, I fixed that, and name was still my name. I switched tabs on to a…
user10124491
0
votes
1 answer
Defining dynamic variables in loop and combining content
I'm new to R and cannot figure out the following problem in dynamically assigning multiple values to variables in a double loop:
I want to generate variables that differ in
a) their names that are already stored in var_names
b) put data from an…

da_the
- 31
- 1
- 3
0
votes
0 answers
Android Studio problem: Unused Java instance variable marked as used
I am using Android Studio 3.2.1 Build #AI-181.5540.7.32.5056338 (linux version). Although this problem might also appear in Intellij Idea which I have not tested. The problem is whenever I name my instance variables by certain names (like…

NewStudent
- 193
- 10