04-09-2024, 06:46 PM
(This post was last modified: 04-09-2024, 06:53 PM by Kernelpanic.)
(04-08-2024, 09:28 PM)Tim Wrote: For example, one of the example programs counts to 100 (from whatever starting point you give it); I would like to be able to see all of the output from it (as well as the results of my own hacks, which I do in order to make sure I can replicate and understand creatively what the lesson(s) teach).In many cases one do not need to scroll, sleep, etc. You display the output side by side.
My recommendation: Use Option _Explicit right from the start so that variables must be declared. This saves you a lot of trouble searching for "inexplicable" errors.
PS: Change Print in Print Using "###"; count
Code: (Select All)
'Anzeige nebeneinander - 9. April 2024
Screen _NewImage(700, 600, 32)
Option _Explicit
Dim As Integer count, spalte, zeilenAnzahl
Locate 2, 3
Print "This program will count to 100 from the number you supply."
Locate 3, 3
Input "Enter the number to start counting from > ", count
count = 0
spalte = 3 'Row
zeilenAnzahl = 20 'Column
Locate 5, spalte
While count < 100
count = count + 1
Print count
Locate CsrLin, spalte
If count Mod zeilenAnzahl = 0 Then
spalte = spalte + 6
Locate 5, spalte
End If
Wend
End

