Conditions within GOSUBS.
My question is If every GOSUB in my game has conditional statements within them, should I use a WHILE WEND loop for every gosub? In other words, is it better to use the WHILE WEND or REPEAT UNTIL command in a GOSUB LOOP?
For example
Graphics3d 800,600
;;load images, sounds, etc
;main loop
While key down(1)=0
If this condition is true then
gosub1
;
If this condition is true then
Gosub2
;
Wend
.Gosub1
While x>10 and sec>10
cls
;Do this
;paste image10
;user clicks a button
;user inputs a answer
Endif
wend
return
While b>15 and tec>12
cls
;Do this
;paste image15
;user clicks a button
;user inputs a answer
Endif
wend
return
;etc other gosub
;other conditional statements
My question is If every GOSUB in my game has conditional statements within them, should I use a WHILE WEND loop for every gosub? In other words, is it better to use the WHILE WEND or REPEAT UNTIL command in a GOSUB LOOP?
For example
Graphics3d 800,600
;;load images, sounds, etc
;main loop
While key down(1)=0
If this condition is true then
gosub1
;
If this condition is true then
Gosub2
;
Wend
.Gosub1
While x>10 and sec>10
cls
;Do this
;paste image10
;user clicks a button
;user inputs a answer
Endif
wend
return
While b>15 and tec>12
cls
;Do this
;paste image15
;user clicks a button
;user inputs a answer
Endif
wend
return
;etc other gosub
;other conditional statements