The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
2answers
166 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 ...
5
votes
3answers
296 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 ...