News:

Building a 3D Ray Tracer  By stevmjon

Main Menu

Print formatting

Started by skillybob, January 13, 2006, 12:01:43 AM

Previous topic - Next topic

skillybob

Well, I'm as new as can be to this so bear with me with a really Basic Question?

Let's say I have a line of programming that says  Print "blah blah.."
and I want to add  additional text  on the SAME line so it would read ..
    blah blah... more blah blah!
Any way of doing this? I've been reading around a bit but haven't smashed into it.
I hope this question isn't too stupid .. this is my first time.

Ian Price

#1
Use the Text X,Y,your text string command


Text 10,10,"Hello"

Text 100,10,"Fred"


or...



name$="Fred"

score=100

Text 10,10,"Hello "+name$

text 10,30,"SCORE="+Str$(score)



:)
I came. I saw. I played some Nintendo.

Digital Awakening

Text allows you to specify the x and y coordinates on the screen.

In case it wasn't clear, use + to connect two strings (bits of text) together like this:

text 10,10, "blah blah... " + "more blah blah!"

When dealing with text it's easier to construct the whole sentence and then print it out. If not it get's a bit trickier and I don't have PB on this computer so I can't look up the commands atm.
Wisit my site at: DigitalAwakening.net

skillybob

Thanks for the assist.... it's nice to know there are people willing to deal with questions as simple as this.

Digital Awakening

#4
No problem :) I think the lack of people means that we are quite a nice bunch and it also means that there aren't many posts to read nor many newbies asking questions either. Basic stuff like that may be hard to find as the help system is oriented more towards the average user.

You should check out the help system. There's a page of tutorials or something similar. I don't know how good these are for new programmers but they may be a good start to learn PB. If you haven't found them already.
Wisit my site at: DigitalAwakening.net

skillybob

Thanks again.... I looked at the help files but never did see a reference to adding a "+" to do what I was wanting. All part of being a newbie I guess. I'll keep pushing pixels and maybe someday I 'll be  able to help someone along.