Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
114 views

Where are C variables declared [duplicate]

I see a lot of code with variables declared right after the function, but when I post something like that people end up mad and say it is better to declare them when they are used. I assume this all ...
5
votes
3answers
288 views

Declaring variables in Python and PHP

The question is how to cope with absence of variable declaration in Python, PHP, and the like. In most languages there is a way to let the compiler know whether I introduce a new variable or refer to ...
2
votes
2answers
160 views

Is there a difference between declaring variables outside or inside a loop? [closed]

Is there any difference if I were to write something like this: int row,col; for(row = 0; row < data.length; row++){ for(col = 0; col < data[row].length;col++){ //do ...
0
votes
3answers
547 views

Declaring a field name starting with underscore [duplicate]

Before forming a class in Java or other programming languages that support OOP, should I use underscore (_) in each (local or private) field declaration. More precisely: private String ...
6
votes
8answers
439 views

What is the possible disadvantage of putting declarations in inner blocks, instead of at beginning of function?

At the place where I work, there are explicit guidelines for placement of declarations of variables. According to that, it is required to put them at the global level and / or at the beginning of ...
6
votes
4answers
417 views

Reason behind multi-line declaration style?

I'm a little curious about the reason behind the Windows header file declaration styles. When I read them, I see multi-line declarations such as the following: WINBASEAPI HANDLE WINAPI GetStdHandle( ...