for loop with a print call that uses CRSRXY
PhilipWong
Posts: 8
Hi guys,
I'm tryiing to do the ActivityBot tutorials, in the Test the Whiskers tutorial the last part where we do a print table. I'm not sure how or where to start.
Please help.
Phil
I'm tryiing to do the ActivityBot tutorials, in the Test the Whiskers tutorial the last part where we do a print table. I'm not sure how or where to start.
Please help.
Phil
Comments
http://learn.parallax.com/propeller-c-start-simple/counting-loops
Consider how you can pass the value of the n variable to the print function and it displays in SimpleIDE Terminal. Couldn't you use that same variable and a for... loop to successively increase the CRSRXY positions?
Andy
Alright I'm getting an idea now, the new question that I'm facing now is:
how do I display the indentation/tab part?
Thanks
Phil
http://learn.parallax.com/activitybot/test-whiskers
The two numbers following CRSRXY are the the number of spaces over (X) and lines down (Y). That's what positions the cursor in the SimpleIDE Terminal. After it positions the cursor, the next print statement will start displaying characters at the new cursor position. Put that all inside a for... loop.
NOTE: It is also possible to use print("%c message", TAB), but that is not the intent of the Your Turn. It is supposed to build off the earlier for... loop activity, and the Try This just above it.
Right, I will give that a go. And if I run into more issues I'll come back and ask.
Thanks a lot for your help!