Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
request for printing patterns with for loops tutorial
#9
(11-20-2024, 11:59 PM)fistfullofnails Wrote: Thanks everyone, but I still need to start with something simple, like a square, because I really don't understand what's happening.

Here is that square and some comments
Code: (Select All)
' col is short for column
' using default non graphics screen = Screen 0
' uses rows and cols for locating a character that is printed
' this screen is 80 characters wide and 25 characters high.
' Characters not pixels, anything Ascii that is printed typing

' Locate row, col
' row 1 is top row in screen any less is error
' col 1 is the first on the left


' print 3 rows of 4 *'s across
colStart = 1: colEnd = 4 ' for 4 * across
rowStart = 1: rowEnd = 3 ' for 3 rows
For row = rowStart To rowEnd
    For col = colStart To colEnd
        Locate row, col: Print "*"; ' print each * one at a time  the ; let's next print occur on same line
        _Delay .5
    Next
Next
b = b + ...
Reply


Messages In This Thread
RE: request for printing patterns with for loops tutorial - by bplus - 11-21-2024, 01:28 AM



Users browsing this thread: 1 Guest(s)