email: ivan5815@yahoo.com
name: Ivan Rijadi
Comments: Master Pete,
I'm a super newbie in QBASIC. I recently read the tutorial in the Net, but I can't develop the program any further.The program output was like this:
C
IC
SIC
ASIC
BASIC
QBASIC
Can you tell me how to do it? And please make it simple so I won't get confused. Thanks for your time.
Text Parsing Question
Text Parsing Question
I'm busy. Have at it, guys!
-
- Veteran
- Posts: 703
- Joined: Sun Nov 14, 2004 7:36 am
- Contact:
This should work:
Code: Select all
Parse$ = "QBASIC"
FOR Counter% = 1 to LEN(Parse$)
PRINT RIGHT$(Parse$, Counter%)
NEXT Counter%
When God created light, so too was born, the first Shadow!
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
I'll insert comments to make it easier, hence:
QBASIC Newbie wrote: Can you tell me how to do it? And please make it simple so I won't get confused. Thanks for your time.
Code: Select all
Parse$ = "QBASIC" 'What the original word is to parse
FOR Counter% = 1 to LEN(Parse$) 'Starts a loop which goes until the end of the word is reached
PRINT RIGHT$(Parse$, Counter%) 'Output how many letters are at the end, which has been counted
NEXT Counter 'Go back to the start of the loop