Top "Variable-assignment" questions

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

Assignment with "or" in python

Is it considered bad style to assign values to variables like this? x = "foobar" or None y = some_variable or …

python coding-style variable-assignment
Python Multiple Assignment Statements In One Line

(Don't worry, this isn't another question about unpacking tuples.) In python, a statement like foo = bar = baz = 5 assigns the variables …

python variable-assignment
Why does this go into an infinite loop?

I have the following code: public class Tests { public static void main(String[] args) throws Exception { int x = 0; while(x&…

java loops operators variable-assignment increment
Why does i = i + i give me 0?

I have a simple program: public class Mathz { static int i = 1; public static void main(String[] args) { while (true){ i = …

java math variable-assignment
memcpy vs assignment in C

Under what circumstances should I expect memcpys to outperform assignments on modern INTEL/AMD hardware? I am using GCC 4.2.x …

c struct variable-assignment memcpy
Is it possible to have tuple assignment to variables in Scala?

Possible Duplicate: Tuple parameter declaration and assignment oddity In Scala, one can do multiple-variable assignment to tuples via: val (a, …

scala variable-assignment tuples
numpy function to set elements of array to a value given a list of indices

I'm looking for a numpy function that will do the equivalent of: indices = set([1, 4, 5, 6, 7]) zero = numpy.zeros(10) for i in …

python numpy variable-assignment indices
Java - char, int conversions

In Java, the following is allowed: char c = 'A' + 1; Here, c will hold the value 'B'. Above, first the expression …

java char type-conversion int variable-assignment
How to suppress "unused variable" warnings in Eclipse/PyDev

How to suppress "unused variable" warnings in Eclipse/PyDev When I'm working with functions that return tuples, I often only …

python eclipse variable-assignment pydev
Multiple variable assignment in Swift

How do I assign multiple variables in one line using Swift? var blah = 0 var blah2 = 2 blah = blah2 = 3 // Doesn't work???

variables swift variable-assignment