You say you understand how a while-loop works. Tell me, do you understand this code:
int LoopNumber=0;
while (LoopNumber<10){
dbText(LoopNumber,LoopNumber,"Here");
LoopNumber++;
}
dbSync();
I declared an integer with "int" and initialized it to a value of 0.
Next we have the while-loop encapsulated with {}. These {} mean that everything inside them is part of that while-loop.
Inside the while-loop I told GDK to put text"Here" at "x,y" coordinates LoopNumber,LoopNumber.
Next I incremented LoopNumber.
Each time the process comes to the '}' it will check the value of LoopNumber and if it's less than 10 it will go back to the top '{' and continue processing like before. Once LoopNumber is 10 (or greater) when the process reaches the '}' it will go past to the next process which brings me to the next line of code.
dbSync() tells GDK to render the scene.
The code snipet above will not work on it's own, it has to be within the declaration that GDK gives when you create a new program.
Is any of that unclear? What else do you have questions about?
The fastest code is the code never written.