How do I write multiple statements on a single line?
Posted
#1
(In Topic #1237)
Trainee
Code
;I was trying to do something similar to:
Code (gambas)
- startX = 127; lastX = 0; stepX = -1
- startY = 1; lastY = 127; stepY = 1
But I've been forced to do:
Code (gambas)
- startX = 127
- lastX = 0
- stepX = -1
- startY = 1
- lastY = 127
- stepY = 1
Since I have to do this 9 times to handle horizontal/vertical/diagonals/center. They both look messy but I was hoping to constrain the ugliness to a few lines -
Posted
Guru

But doing something like that nine times can often be turned into a function or done in a loop.
1 guest and 0 members have just viewed this.



