Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Suppressing the carriage return?

Author
Message
frostyrootbeer
21
Years of Service
User Offline
Joined: 23rd Dec 2002
Location: Afghanistan
Posted: 26th Dec 2002 02:45
I was wondering what the code statement for suppressing the carrige return (geeky name) or stopping the compiler from adding a space after a line of code is?
IE:
Code:
PRINT "hello"
PRINT name$
Output :
Hello
bob

I want to have both on the same line IE
"Hello bob"

How do i do this?
Is their a way to print regular text with a variable using one line of code?

Supreme Lord Of Newbieness
~Frostyrootbeer
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 26th Dec 2002 03:12
Apparently :



still puts the text on each line (with P3.1) (which it shouldn't), so you'll probably have to use the SET CURSOR command

Good news everyone! I really am THAT good...
Oh my, yes...
frostyrootbeer
21
Years of Service
User Offline
Joined: 23rd Dec 2002
Location: Afghanistan
Posted: 26th Dec 2002 04:57
I know in regular ol' basic (at least the one i fiddled with) there was a function that stopped the automatic line down thingy. Hmmm I can't believe that you can't put a variable and text on the same line, as you can do it in almost everyother language. Well hopefully you wandering DB gods can help me out.
Thanks

Supreme Lord Of Newbieness
~Frostyrootbeer
frostyrootbeer
21
Years of Service
User Offline
Joined: 23rd Dec 2002
Location: Afghanistan
Posted: 26th Dec 2002 21:04
I figured it out, and I must remark on my stupidity.

*slaps self in forehead

words to live by.... Newsgeek.tripod.com
QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 27th Dec 2002 03:39
Using "Set Cursor X,Y" you can put text anywhere. Just put that before the print command.
heartbone
21
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 27th Dec 2002 12:39
DBPro does recognize the semicolon as a carriage return inhibitor when suffixing a print statement.
But there is a bug where it will not function for the very first print statement in a DBP program. The following snippet will demonstrate it.



The more you see, the more you know.
The more you know, the more you see.
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 27th Dec 2002 13:37
Yes, I've e-mailed Lee about this.

Good news everyone! I really am THAT good...
Oh my, yes...

Login to post a reply

Server time is: 2024-05-01 20:21:31
Your offset time is: 2024-05-01 20:21:31