Text colors

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
johnfin
Coder
Posts: 18
Joined: Tue Apr 01, 2008 8:26 am

Text colors

Post by johnfin »

How can I print different colors of text on the same line. I have tried TAB and ; and I cant get it to work.
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

2 colors on same line of text

Post by burger2227 »

You can place a semicolon and a colon between 2 Color Print statements:

Code: Select all

COLOR 10: PRINT "Hello"; : Color 12: PRINT " World"
Or just place a semicolon at the end of the first PRINT statement and put another COLOR PRINT statement on the next code line.
LOCATE could also be used for the first Print statement.

Ted
Last edited by burger2227 on Tue Apr 01, 2008 1:40 pm, edited 1 time in total.
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
johnfin
Coder
Posts: 18
Joined: Tue Apr 01, 2008 8:26 am

text color

Post by johnfin »

Thanks, god I am rusty. I write basic programs about once a year.
Post Reply