Hello folks... yes I'm back... been gone for awhile and been doing alot of graphic stuff, but have recently been dusting off my PowerBASIC books and attempting my hand at CGI programming in PB 3.5 and ran into a little snag when it comes to redirection. Now I know that PBCC supports the STDOUT feature, but what really busts my butt is that it doesn't support the MAP String$$ functions or the SHARED variables in sub/functions unless you declared them GLOBAL... so here's my problem...
- Take any GIF/JPG file... let's say PICTURE.JPG...
- Open up your CONS: for STDOUT output
- Open your pic file and red the contents into a string
- Print that string out to CONS: for redirection
Here's what I discovered... no matter what the setting of the
$LIB IPRINT on|off
It will replace CHR$(9) with a Space! What's up with this?
Okay... try this code out:
OPEN "O", 1, "FILE.TXT"
PRINT #1, CHR$(8,9,10);
CLOSE #1
OPEN "O", 1, "CONS:"
PRINT #1, CHR$(8,9,10);
CLOSE #1
Compile and run the program... with the following command line:
STDOUT.EXE > FILE.SCR
Now take a look at the files... they should both contain CHR$(8,9,10) but NOOooooooooooooooooo... FILE.SCR contains CHR$(8, 32, 10)... so here's the challenge... can anyone figure out a way to bypass this little problem? Let me know!
------------------
-=> James "The Garf!" Davis! <=-
- Take any GIF/JPG file... let's say PICTURE.JPG...
- Open up your CONS: for STDOUT output
- Open your pic file and red the contents into a string
- Print that string out to CONS: for redirection
Here's what I discovered... no matter what the setting of the
$LIB IPRINT on|off
It will replace CHR$(9) with a Space! What's up with this?
Okay... try this code out:
OPEN "O", 1, "FILE.TXT"
PRINT #1, CHR$(8,9,10);
CLOSE #1
OPEN "O", 1, "CONS:"
PRINT #1, CHR$(8,9,10);
CLOSE #1
Compile and run the program... with the following command line:
STDOUT.EXE > FILE.SCR
Now take a look at the files... they should both contain CHR$(8,9,10) but NOOooooooooooooooooo... FILE.SCR contains CHR$(8, 32, 10)... so here's the challenge... can anyone figure out a way to bypass this little problem? Let me know!
------------------
-=> James "The Garf!" Davis! <=-
Comment