Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OPEN
#1
I am opening a file for output
Code:
OPEN "bob.txt" FOR OUTPUT AS #1
PRINT #1, "Hi wuts up?"
CLOSE #1

But when i make it an EXE using QB 4.5 it doesn't work.
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#2
Maybe it's a sign that you aren't Jesus.
earn.
Reply
#3
You sure?
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#4
try write #1 instead of print #1
if somebody cuts of your hand you still have two sharp bones to stick in thier eyes"
Reply
#5
Quote:I am opening a file for output
Code:
OPEN "bob.txt" FOR OUTPUT AS #1
PRINT #1, "Hi wuts up?"
CLOSE #1

But when i make it an EXE using QB 4.5 it doesn't work.

Why not use instead:

OPEN "bob.txt" for BINARY AS 1
PUT 1, ,"Hi wuts up?"
close 1

and not worry about it? Also, if you are using an OPEN x FOR OUTPUT construct, why not use the WRITE 1, text instead of PRINT 1...? If you use the WRITE format instead of PRINT, the data will be comma deliminated...which is easier to read when you are retrieving your data.

cheers
Reply
#6
I tries it with binary but when i turn it into an EXE it doesn't work
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#7
Quote:I tries it with binary but when i turn it into an EXE it doesn't work

Whitetiger...I just compiled your original 3-line prog...works fine...I can read the test file no prob...FYI
Reply
#8
There's nothing wrong with that program as written. Are you absolutely sure *that's* the program you're trying to make an executable of? Humor me. Save your program. Let's say you called it "program.bas", for definitiveness. Open a DOS window. CD to the directory where that file is. Do

BC PROGRAM /O;
LINK PROGRAM;

If you don't get any error messages from BC or LINK, try running PROGRAM.

Now that I've typed all that, as I was typing the "/O", above, it occured to me that I should've asked what you meant by "doesn't work". Does the executable get made, or do you get compilation/LINK errors. If it gets errors when it runs, what errors did you get? (I'm wondering if the only problem is that you didn't make a stand-alone executable and your program can't find BRUN45.EXE.)
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply
#9
there were no errors. i bet that was it.
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#10
I don't know but I think you should

cls

Screen 0
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)