×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Qbasic destroying my progarms!

Qbasic destroying my progarms!

Qbasic destroying my progarms!

(OP)
Has anybody encountered this problem before, they write a program then next time you try to load after restarting qbasic you get 'BAD FILE MODE' even though the file should theoretically be fine?  This has happend to me numerous times, i've even re-written my program twice and this keeps happening... I also tried opening it in an editor and all I get is garbage like wingdings..

anyone?

RE: Qbasic destroying my progarms!

Are you saving it as a text file, or letting QBasic save it in tokens?

Lee

RE: Qbasic destroying my progarms!

If you write the program in QuickBasic and save it in fast load mode (tokens), then try to open it in Qbasic this will
happen probably. Qbasic only reads progs saved as text.

Possibly, if you had long lines it could give you trouble
upon reloading it (just a thought).

You can always open it with the dos editor. If it's got
control characters embedded then it was tokenized.

RE: Qbasic destroying my progarms!

(OP)
I don't understand what you mean by tokenized? the file does have loads of control characters in it now, all i did was just save it as I always do.  Then the whole file got screwed up, is there any way to convert it back into a normal file? explain what you mean with these tokens please.

RE: Qbasic destroying my progarms!

Did you save it in QBASIC, or QuickBASIC?

Lee

RE: Qbasic destroying my progarms!

(OP)
I actually thought I was using just qbasic, but no its apparently the quickbasic 4.5 program.

RE: Qbasic destroying my progarms!

If you want to read the code as a text file, then you have to Save As and make sure there's an X in the choice for text - readable by other programs.

Lee

RE: Qbasic destroying my progarms!

(OP)
ack. Do that I always save it the same way.  just the next day when I loaded up the program I get 'bad file mode' !! something is screwy here.. why is this happening.. when i save it correctly

RE: Qbasic destroying my progarms!

To get BAD FILE MODE do the following:

*****************
using NOTEPAD type one line (example: Print "HI") then save the file as TEST1.BAS and TEST2.BAS (make sure .TXT is not the extension)


*****************
> open QB and load TEST1.BAS and type Print "Hi yourself" under the existing line.

> then click FILE>SAVE AS.

> when the "SAVE AS" dialog box shows up, look in the section that says 'FORMAT' and make sure there's a DOT in the option that says 'TEXT - READABLE BY OTHER PROGRAMS'.

> then click on the OK.


*****************
> open QB and load TEST2.BAS and type PRINT "Hi yourself" under the existing line.

> then click FILE>SAVE AS.

> when the "SAVE AS" dialog box shows up, look in the section that says 'FORMAT' and make sure there's a DOT in the option that says 'QUICKBASIC - FAST LOAD AND SAVE'.

> then click on the OK.


*****************
Using NOTEPAD, open TEST1.bas and add a space to the PRINT "Hi" so that it looks like: PRINT " Hi". and save it.

Using NOTEPAD, open TEST2.bas and look for "HI yourself" (the other symbols you see are tokens).  Once you find the phrase, add a space to it so that it looks like: "Hi your self" and then save it.


*****************
open QB and load in TEST1.bas -- it should load w/o problems.  Now try loading TEST2.bas -- you should get "BAD FILE MODE"


--------------------
Hope this helps answer your question -- some program(s) is modifying your 'quick-saved' BAS file.  Worst case: drive starting to crash?  Did you install some new software? Is the QB you have an OEM?

--MiggyD

--> It's a bird!  It's a plane!  No, it's an OS update patch! Ahh!! <--

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close