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.

DarkBASIC Professional Discussion / Simple text Question...

Author
Message
Alkaline
21
Years of Service
User Offline
Joined: 4th Dec 2003
Location: Seattle, Washington
Posted: 9th Aug 2005 22:19
hey all
ok i have my code to read a ini file with text and info mation in it for the config. well what i have in the text is

beepers=blah blah blah blah

the program reads what beepers is and textx it to the screen, well what i want is to limit the text to the screen so although the file says

beepers=blah blah blah blah

i want it the program to limit the amount of text and print to the screen

bla blah bl...
with the dots at the end...

hehe i know its a noob question but im just now getting in to db after modeling alot.

768 DDR pc3200||ATI 9600xt 256mb||240 GB hard drive||
http://www.Veonite.com
Cookyzue
21
Years of Service
User Offline
Joined: 12th Oct 2003
Location: Who Cares?!
Posted: 9th Aug 2005 23:07
Not 100% sure if this what you mean but try this...

text x,y, left$(beepers$,amountofcharactersyouwant#)+"..."


MCK Games
Alkaline
21
Years of Service
User Offline
Joined: 4th Dec 2003
Location: Seattle, Washington
Posted: 9th Aug 2005 23:11
for the amount of charcters i want would that be 1 charcter for each letter, space,etc?

768 DDR pc3200||ATI 9600xt 256mb||330 GB hard drive||Amd XP 3000+
InDex v2.0
Cookyzue
21
Years of Service
User Offline
Joined: 12th Oct 2003
Location: Who Cares?!
Posted: 9th Aug 2005 23:16
yes so..
beepers$="bob is a frog"
text x,y, left$(beepers$,6)+"..."

would return "bob is..."


MCK Games
Louiz ofRohr
20
Years of Service
User Offline
Joined: 11th Nov 2004
Location:
Posted: 9th Aug 2005 23:32 Edited at: 10th Aug 2005 00:10
ok..



This is gonna return the amount of each chacter in a string..
Please, notice that:

165x10
is much faster than
10x165

HTH

The worst foe lies within the self...

Login to post a reply

Server time is: 2025-06-09 04:39:51
Your offset time is: 2025-06-09 04:39:51