Top "Declaration" questions

Declaration is the part of the subprogram (procedure or function) which provides the protocol(header), but not the body of the subprogram.

Variable declaration placement in C

I long thought that in C, all variables had to be declared at the beginning of the function. I know …

c declaration c89
How should I use the "my" keyword in Perl?

I keep seeing the "my" keyword in front of variable names in example Perl scripts online but I have no …

perl scope declaration
C# member variable initialization; best practice?

Is it better to initialize class member variables on declaration private List<Thing> _things = new List<Thing&…

c# constructor declaration
Declaring variables without var keyword

At w3schools there is written: If you declare a variable, without using "var", the variable always becomes GLOBAL. Is …

javascript variables global-variables declaration
How do I pass a hash to a function in Perl?

I have a function that takes a variable and an associative array, but I can't seem to get them to …

perl function parameter-passing declaration
Eclipse Open declaration in Java project

In an Eclipse SVN project I have a problem; when I tried to open a declaration of one class, I …

java eclipse declaration
Where you can and cannot declare new variables in C?

I heard (probably from a teacher) that one should declare all variables on top of the program/function, and that …

c declaration
Declare array in C++ header and define it in cpp file?

This is probably a really simple thing but I'm new to C++ so need help. I just want to declare …

c++ arrays header declaration
Strict mode in PHP

Other languages with automatic variable declaration - like Perl - have a strict mode. By activating this strict mode, variable …

php variables declaration