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 / TEXT and INPUT Placement

Author
Message
GreyHeart
19
Years of Service
User Offline
Joined: 9th Feb 2005
Location:
Posted: 6th Apr 2005 16:01
Hi, I just bought DarkBASIC Pro, and i have a few questions about text and input placement, could someone help plz?

1. How can I place an integer variable where I want it on the screen? It says I need a string when I use TEXT, and I can't place it using PRINT

2. Is there a line break command in TEXT? Like /n or something that I can use in the middle of a string to line break it? If not, then what could I do in a situation like that?

3. How do I choose where to place INPUT? It always goes to the upper corner.

Any help would be very appreciated
I'm writing a program for my history class
Thanks in advance
GreyHeart
Professor Bob Bobson
19
Years of Service
User Offline
Joined: 6th Apr 2005
Location: I\'m behind you!!!!
Posted: 6th Apr 2005 22:15
Hi, I'm a noob too.

No2. You could type your text then go down a line and put print command in.

Professor Bob

DON'T DRINK AND DRIVE.TAKE DOPE AND FLY!!!
Vixen
19
Years of Service
User Offline
Joined: 6th Apr 2005
Location: Netherlands
Posted: 6th Apr 2005 22:41
1: Just convert your integer to a string using STR$(intvariable)
2: You just put PRINT on separate lines.
3: Use the SET CURSOR X,Y command followed by INPUT
Neil19533
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 6th Apr 2005 22:59
1. put a $ at the end of your string name eg:
input "",text$
2.i dont know if there is a line break but it will print onto a new line every time you use the print command
3.set cursor x,y

Any spelling mistakes are totally In tensional.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 7th Apr 2005 02:37
to print a value held is say x on the screen with the text command to write it like this:

text 20,20,str$(x)

which reads place value at screen coordinates 20 pixles in by 20 pixles down then covernt the value in x to a text string.


hope this helps.

In Space No One can Hear You Scream! (When your comm Line is cut?)
wmf
19
Years of Service
User Offline
Joined: 6th Nov 2004
Location:
Posted: 7th Apr 2005 03:32 Edited at: 7th Apr 2005 03:34
edit: I didn't know you posted in two different places. here is what i answered in the other forum.
===================================

here is what I do for a help page for a card game. it is one a long string broken up and justified on the left and about 55 chars. the hidesprites function is commented out, it clears the screen. the exit char can be 10 or 13.
GreyHeart
19
Years of Service
User Offline
Joined: 9th Feb 2005
Location:
Posted: 7th Apr 2005 15:05
ya, i accidentally posted in discussion, but thanks, you guys (or girls) helped a lot

Login to post a reply

Server time is: 2024-09-23 17:25:29
Your offset time is: 2024-09-23 17:25:29