attached are the sources and executable for SSB version 2.7.2d which has had the Spanish language added as per the previous post from @badaman.
The zip file was created on a QL, not on a Linux/Windows/Mac device.

Cheers,
Norm.
Code: Select all
200 REPeat gobbledegook
210 a$ = CHR$(RND(65 TO 90))
220 PRINT a$;
230 IF a$=”A”: min=min+1: NEXT gobbledegook
240 IF a$=”Z”: max=max+1
250 NEXT gobbledegook
Code: Select all
330 FOR k = 0 TO DIMN(arr$,1)
340 row = k: IF arr$(row)==name$:EXIT k
350 NEXT k
360 row = -1
370 END FOR k
There can be a small difference in use.tofro wrote: Fri Jul 05, 2024 3:43 pm Yes, you can use NEXT in a REPeat loop to start the next iteration prematurely (typically conditionally).
...
Right, forgot that, thanks. Probably because I never check for loop variables outside the loop - I find that's a bad practice.BSJR wrote: Sat Jul 06, 2024 11:26 amThere can be a small difference in use.tofro wrote: Fri Jul 05, 2024 3:43 pm Yes, you can use NEXT in a REPeat loop to start the next iteration prematurely (typically conditionally).
...
The NEXT will update the FOR variable, find it's out of range and terminate the loop.
The END FOR will not do that.
If you do test this variable outside the loop that must be considered.
BSJR
Code: Select all
100 CLS
102 FOR i = 1 TO 7
104 i = 8: NEXT i
106 PRINT 'Uh oh'
108 END FOR i
110 :
Code: Select all
100 CLS
102 FOR i = 1 TO 7
104 i = 8: NEXT i: PRINT 'ok': EXIT i
106 PRINT 'Uh oh'
108 END FOR i
Hi Tim, no problem. I was a bit worried that you might object! I was wondering if you would have any objections to putting the source up on the Sinclair QL GitHub?swensont wrote: Fri Jul 05, 2024 10:57 pm Norman,
Thanks for picking up the torch on SSB and releasing a new version. Still nice to see others interested in SSB.
The Concepts section of the QL User Manual, under repetition. Says that the code between the NEXT and the END FOR, is a loop epilogue, that is only executed if the FOR range is exhausted.Derek_Stewart wrote: Fri Jul 05, 2024 2:24 pm
But Jan quotes an example of a FOR loop with the NEXT statement to control the loop and the END FOR statement to mark the end the FOR construct:What is the best way, or does this not matter?Code: Select all
330 FOR k = 0 TO DIMN(arr$,1) 340 row = k: IF arr$(row)==name$:EXIT k 350 NEXT k 360 row = -1 370 END FOR k