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 / Printing without going to a new line

Author
Message
Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 18th Oct 2003 23:59
Ok, really simple problem here. I have an array setup and want to display its contents in row and columns. The only problem is that the print command automatically goes to the next line. Anyway around this?
Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 19th Oct 2003 00:29
semicolon

ie

print "pilchard"
print "herring"

gives

pilchard
herring

while

print "pilchard";
print "herring"

gives

pilchardherring

but you might want to use the text command and devise your own print system if you want to make rows and columns, they ain`t easy in print with a proportional font

Mentor.
Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 19th Oct 2003 00:44
Great! Thanks, I appreciate it.
Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 19th Oct 2003 01:09
Ok, one more thing. Heres the code Im working with...

Quote: "DIM Map$(20,100)

#CONSTANT MAPX 70
#CONSTANT MAPY 30

rem ink RGB(0,0,255), RGB(192,192,192)

FOR Y=1 TO MAPY
FOR X=1 TO MAPX
MAP$(X,Y)="X"
NEXT X
NEXT Y

FOR Y=1 TO MAPY
FOR X=1 TO MAPX
SELECT X
CASE MAPX :
PRINT " "; MAP$(X,Y)
ENDCASE
CASE DEFAULT
PRINT " "; MAP$(X,Y);
ENDCASE
ENDSELECT
NEXT X
NEXT Y

WAIT KEY"


Run it and take note of how it looks and then change
Quote: "rem ink RGB(0,0,255), RGB(192,192,192)"
to
Quote: "ink RGB(0,0,255), RGB(192,192,192)"


Now the first thing is that the foreground is blue like it should be, but the background is still black. Second, the letters are more spaced out than when the ink command was commented out. Any suggestions?
Wik
23
Years of Service
User Offline
Joined: 21st May 2003
Location: CT, United States
Posted: 19th Oct 2003 01:23
to change the background color you should:
Quote: "
cls RGB(192,192,192)
"


Hope I helped...

The rock has rolled!
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 19th Oct 2003 01:25
Yes, I've never got the second parameter to work properly. I'll stick this in the Bug Reports section, if I were you.


Avatar & Logo by Indi. Insert witty comment here...
Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 19th Oct 2003 01:29
Grr...ok to the bugs forum it is

Login to post a reply

Server time is: 2026-07-26 09:30:28
Your offset time is: 2026-07-26 09:30:28