Top "Variable-assignment" questions

A process of setting or re-setting the value stored in the storage location(s) denoted by a variable name.

What does the keyword Set actually do in VBA?

Hopefully an easy question, but I'd quite like a technical answer to this! What's the difference between: i = 4 and Set …

vba variable-assignment
Shortest way to check for null and assign another value if not

I am pulling varchar values out of a DB and want to set the string I am assigning them to …

c# .net null variable-assignment
Python: Assign Value if None Exists

I am a RoR programmer new to Python. I am trying to find the syntax that will allow me to …

python python-2.7 variable-assignment language-comparisons
Global variables in R

I am poking into the manuals, I wanted to ask the community: How can we set global variables inside a …

r global-variables variable-assignment
Linux bash: Multiple variable assignment

Does exist in linux bash something similar to the following code in PHP: list($var1, $var2, $var3) = function_that_returns_…

linux bash shell variable-assignment multiple-variable-return
R: += (plus equals) and ++ (plus plus) equivalent from c++/c#/java, etc.?

Does R have a concept of += (plus equals) or ++ (plus plus) as c++/c#/others do?

r operators variable-assignment increment
Multiple left-hand assignment with JavaScript

var var1 = 1, var2 = 1, var3 = 1; This is equivalent to this: var var1 = var2 = var3 = 1; I'm fairly certain this is the order …

javascript variables variable-assignment
Check if returned value is not null and if so assign it, in one line, with one method call

Java is littered with statements like: if(cage.getChicken() != null) { dinner = cage.getChicken(); } else { dinner = getFreeRangeChicken(); } Which takes two calls …

java syntax null variable-assignment method-call
Assignment inside lambda expression in Python

I have a list of objects and I want to remove all objects that are empty except for one, using …

python lambda expression variable-assignment
Creating an array from a text file in Bash

A script takes a URL, parses it for the required fields, and redirects its output to be saved in a …

arrays bash loops scripting variable-assignment