Jump to content
IGNORED

IntyBASIC Display Text from Data?


First Spear

Recommended Posts

(earlier code increments #goRun variable and then Gosub TextShow then Wait 3 seconds)

TextShow: Procedure
	Restore TextTable
	For #nom = (#goRun*11) to (#gorun*11+11)
		Read #titleText
	Next
	Print At 220 Color 7 , #titleText
	Return
End


TextTable:
	Data "posting    "
	Data "a new topic"
	Data "is fun     "


I want this to show "posting" then pause for 3 seconds then show "a new topic" then pause for 3 seconds then "is fun". Each string is forced to 11 characters.

 

What is wrong with that code? Am I missing multiplication somewhere due to using PRINT?

 

Thanks.

 

 

Link to comment
Share on other sites

I'm not sure what you're doing with that loop structure. You're reading values in a loop and only doing something with the last one after the loop.

 

Something like this might be more effective:

.

#tmp = #goRun * 11
FOR #num = 0 TO 10
    #BACKTAB(#num + 220) = (TestTable(#tmp + #num) - $20) * 8 + 7
NEXT #num

.

I don't know that PRINT offers a "print string at pointer."

 

I'm sure some IntyBASIC experts will offer better ways to encode your strings so you don't have to do the offset-and-multiply I'm doing above.

Link to comment
Share on other sites

TextShow: Procedure
        Print At 220
	For #nom = (#goRun*11) to (#gorun*11+10)    ' Plus 10 not 11 because zero counts.
		Print TextTable(#nom) * 8 + 7       ' Convert to GROM and add color
	Next
	Return
End
 
 
TextTable:
	Data "posting    "
	Data "a new topic"
	Data "is fun     "
Of course this would be somewhat inefficient because the continuous multiplication by 11, but it should work.

 

Remember that using a variable or expression directly copies that word value into the screen without changes.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...