Questions tagged [var]

var is a keyword in a number of programming languages.

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

The variable statement declares a variable, optionally initializing it to a value.

In C# it is used to declare a variable of an implied type.

Beginning in Visual C# 3.0, variables that are declared at method scope can have an implicit type var. An implicitly typed local variable is strongly typed just as if you had declared the type yourself, but the compiler determines the type. The following two declarations of i are functionally equivalent:

 var i = 10; // implicitly typed
 int i = 10; //explicitly typed

References:

2462 questions
0
votes
1 answer

Error in VAR model

I have this data: Year W L PTS GF GA S SA 1 2006 49 25 106 253 224 2380 2662 2 2007 51 23 110 266 207 2261 2553 3 2008 41 32 91 227 224 2425 2433 4 2009 40 34 88 207 228 2375 2398 5 2010 47 29 100 217 221 2508 2389 6 …
papelr
  • 468
  • 1
  • 11
  • 42
0
votes
1 answer

use userdefults to save user choice but not override segue (swift4)

I need my code below to save whatever is in the var color when it is segued to. When the app starts the color is black and it should be either brown or red expect if it is the first time the user is running the app. The problem is once the user in…
user8105388
0
votes
1 answer

swift - use an integer for loop in a variable's name

I' like to doe something like this : for i in 0...3 { let skspritenode\(i) = SKSpriteNode(imageNamed: "Layer_\(i)") self.addChild(skspritenode\(i)) } that doesn't work because my skspritenode(i) is a let and not a string and I have tried this: for…
0
votes
2 answers

Difference between var and let

I just read the discussion about var and let in Kyle Simpsons "You Dont Know Javascript." Chapter 2: Nested Scopes The function foo uses block declaration of variables with let, the function bar uses ordinary declaration with var. For my clarity, in…
TMOTTM
  • 3,286
  • 6
  • 32
  • 63
0
votes
4 answers

Javascript methods with a var in it

I'm trying to get the value of an object in a object but the key value is a variable so I don't know how to have this code working: var res = 'Hello'; var greetings = { 'Hello': {'lang':'EN' ,'goodbye': 'Goodbye'}, 'Bonjour': {'lang':'FR',…
Otor
  • 410
  • 10
  • 21
0
votes
1 answer

how replace the id in src script with var in file config

replace value xxx by var get from config