almirlalicic:
I didnt use a setup and loop becouse it seemed redundant to me to make a loop function if im already trying to use a for loop. And cant use pinMode in setup becouse i want to increment a pinMode variable by one every time it passes true through a loop...
You set the mode of all the pins once and you don't need to repeat them again.
What you increment is the variable you use to access pins through their numbers, that doesn't set the modes of those pins.
I -do- change pin modes in loop() when I am for example polling buttons in a row&column matrix but that is on need to only have 2 pins acting on the matrix at a time.
Arduino setup() and loop() are automation-friendly and the chips on the boards are microcontrollers made for automation.
When/If you do learn cooperative tasking on Arduinos you will see how using void loop() to interate through processes can give you very fast responses to all sensed events.
Also be aware that on small Arduinos there is not much RAM. Small values like pin numbers are best held in type byte variables, to use type int wastes a byte per pin. Sure in a small sketch it matters not but the habit does not end with sketch size, it gets stronger.
There is a book titled Processing and Wiring about PC+MCU. There is a Processing language (in Java) side you can get a processing.org and Arduino came about as a version of Wiring but most of the discussion has nothing to do with Processing.
You have a tool that can be used in many ways. The default way has definite benefits.