Variable or scalar is a storage location paired with an associated symbolic name (an identifier), which contains some known or unknown quantity or information referred to as a value.

learn more… | top users | synonyms

10
votes
5answers
725 views

Does any programming language use variables as they're in maths?

In maths, a variable means you can put any number there, and an equation will still be true: root(square(x)) = abs(x) In programming languages, this is not so: a var can change. In Python: y = ...
2
votes
2answers
132 views

Best way to delimit variable elements of a path in code documentation?

Often some element of a path is variable, but the path as a whole needs to be documented in some manner for later programmers. Especially when using *nix systems, almost any character is a valid ...
6
votes
18answers
3k views

What do you name functions/variables/etc when you can't think of a good name?

When you are defining a function/variable/etc and are not sure what to name it, what do you name it? How do you come up with a name? If you use a temporary name as a place-card until you give it it's ...
20
votes
17answers
11k views

How do you name your private variables in C#? [closed]

What is the best practice, most commonly accepted naming conventions for private variables in C#? private int myInteger; private int MyInteger; private int mMyInteger; private int _myInteger; ...
16
votes
3answers
2k views

What's the origin of foo and bar? [duplicate]

Possible Duplicate: Using “Foo” and “Bar” in examples I know AT&T labs used them in their Unix days, but do they have even deeper histories?
68
votes
22answers
26k views

Where do you declare variables? The top of a method or when you need them? [closed]

I am in sort of a dilemma (in a geekish way of course). I love to declare variables at the beginning of my methods, and usually order them in some logical way. The problem is, when the list gets ...