×
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

Out of string space if compiled on my box

Out of string space if compiled on my box

Out of string space if compiled on my box

(OP)
I've got this program that I compile in BC7 that generates an out of string space error at execution. If i hand the same code to a friend that compiles it on his machine, and run the program on my PC, it works fine.

The only difference I see is that I have XP and he has 98. However, if I compile on a third box (DOS 6, Target PC that runs the exe.), it generates the same error.

Why is this happening? I need to be able to build from my PC.

RE: Out of string space if compiled on my box

First look at line lengths. Try to keep line lengths less
that 100 characters if at all possible.

Usually, this is caused either by large string arrays or
just a program that's too large.

If it is the arrays, it may be harder to overcome.

Programs, however, in QB, can be cut into several bas files.

A main module with module level code and other bas files
with just subs and functions and no main module code.

If you split it up this way (putting subs and functions in
other bas files), you can open the main file then "load"
the other bas files. QB will create a "MAK" file so that
the next time you open the main module, all the bas files
will be loaded also.

This way, when you compile it, each bas file is compiled individually then linked together allowing large programs to be created.

RE: Out of string space if compiled on my box

(OP)
OK, the program already is split into 15 different BAS files years ago (and it's giving me problems now, go fig).

However, I have two larger programs that don't give me any problems at all.

Also, these programs are WAAAY to big for the QBX IDE (I've tried, many times).

I use a dos batch file for compiling (using BC switches /MBF/S/FS/E/G2 for all of them) and linking.

But the thing that annoys the hell out of me is that I can copy my entire BC7 folder (with my source) to the Win98 PC to compile, and it works just fine on the DOS box (which is actually DOS 5 after checking)

RE: Out of string space if compiled on my box

try to check how much DOS memory have each of the boxes
(MEM command at DOS prompt)?
I recall then I had DOS box I had things tuned to get maximum DOS memory... while now under XP I just don't care

RE: Out of string space if compiled on my box

well looks like you've done about all you can do. I would say that you should probably stay with win98 for compiling purposes then.

By the way. You mentioned using a bat file to compile your program.

I've got a compiler aid on my site. It was designed to be able to compile a large number of programs at one sitting.

There are 2 programs actually one that makes a bat file that can be used for all kinds of things and another that does compiling. See what you think.

http://thunder.prohosting.com/oasys/frameex1.htm

on the files page
execbat and tcompile

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