QB 4.5 SHELL command in large programme help needed 
Author Message
 QB 4.5 SHELL command in large programme help needed

I have a problem with quickbasic 4.5.

I have a large program and i need to perform a SHELL comand to invoke a
batchfile. This works fine in a compiled programme but I get a "out of
memory" error when i run inside the QB environment.

Does anybody have a workaround idea ?

Thanks in advance

/Jonas Rosberg



Fri, 14 Aug 1998 03:00:00 GMT  
 QB 4.5 SHELL command in large programme help needed
G'Day ALL

Quote:

>Subject: QB 4.5  SHELL command in large programme help needed
>Date: 26 Feb 1996 21:40:17 GMT
>I have a problem with quickbasic 4.5.
>I have a large program and i need to perform a SHELL comand to invoke a
>batchfile. This works fine in a compiled programme but I get a "out of
>memory" error when i run inside the QB environment.
>Does anybody have a workaround idea ?

I have at two approaches, one does not work on batch files, one does not work
in the IDE. :-(

If it is absolutely necessary for you to run this batch file in
the IDE, the only way is to make more lower memory in DOS. That means
unloading TSR's if any, moving DOS and every driver possible to upper memory
etc. Check the results of MEM (if you have DOS 5.0 or better) to see how much
memory you have available, and MEM /C to see whats in there. (Try running MEM
from a plain SHELL in the IDE and see how much memory you have, you may not
ever be able to get enough).

Cheers! Ian



Sat, 15 Aug 1998 03:00:00 GMT  
 QB 4.5 SHELL command in large programme help needed
Try the chain command to call another program that only contains your
shell command. After the chained program has completed its job, chain
back to the opriginal program.

   program_a.exe                        program_b.exe
   -----------------------------------------------------------
     cls                                shell"blah blah blah"
    chain program_b.exe         chain program_a.exe
    chain program_b.exe         end
    end

Good luck

Quote:
>>veggies is stuff food eats!



Sun, 16 Aug 1998 03:00:00 GMT  
 QB 4.5 SHELL command in large programme help needed

Quote:

> >Do what he said in the first paragraph but substitute CHAIN for SHELL
> >and it will work for you.  This is a very good 'trick' to use when
> >the chained app is too large.

> This is my original problem! When the the programme approaches the limit one of the
> first things that happens is that SHELL command stops working!. This problem usually
> occurs inside the QB environment since QB occupies abt 250 Kb memory.

> What Im looking for is ideas to stretch the limit a little further.

I don't think you understand what he is trying to tell you.  I don't
want to get into a 'mine is bigger than yours' argument but I always
travel near the 64K limit and it works for me.

For example say you have two apps.. app1 and app2 - Both quite large.
Then if in app1 you try and chain app2 it will run out of memory.

BUT if you create a third app (App3) that contains only one line
thus "CHAIN app2" then you can chain from app1 to app2 via app3 and
you will not run out of memory.

Of course the same applies on the way back. App4 will only have one
line "CHAIN app1" and it will be chained from app2.

Now say you want to shell from app1 then create another app (App5)
which will say

Shell "Whatever"
CHAIN "app1"

To shell to 'Whatever' from app1 then CHAIN "app5" it will run the
shell and then return you to app1.

As I said earlier App1 will start from the beginning but with clever
use of flags you can make it continue were you left off.

As to the size of the app you can shell.  There is really no answer.

What is the size of the command.com ? They vary with dos versions.
How much spare mem do you have ?
Are you using Expanded mem.
etc etc

I am sure that you will be able to chain from any app to any other
app if you understand the above.

It looks complicated when it is written down BUT in practise it is
very easy

In my last major Programme I had about 20 intermediate apps so I could
easily chain from one to the other.

You must however compile them at least once for them to work within
the IDE.

Phil



Thu, 20 Aug 1998 03:00:00 GMT  
 QB 4.5 SHELL command in large programme help needed

Quote:

>> What Im looking for is ideas to stretch the limit a little further.
>I don't think you understand what he is trying to tell you.  I don't
>want to get into a 'mine is bigger than yours' argument

Right! Of course you don't! <g>

Quote:
>For example say you have two apps.. app1 and app2 - Both quite large.
>Then if in app1 you try and chain app2 it will run out of memory.
>BUT if you create a third app (App3) that contains only one line
>thus "CHAIN app2" then you can chain from app1 to app2 via app3 and
>you will not run out of memory.
>Of course the same applies on the way back. App4 will only have one
>line "CHAIN app1" and it will be chained from app2.

{snip)

Quote:
>In my last major Programme I had about 20 intermediate apps so I could
>easily chain from one to the other.

I like that idea. I told it to my friend about 4 months ago, and it
did work for him. However unlike your case, all we needed was a single
app1, called "chainit.exe". This program took parameters, so it would
chain to whatever you gave it for its COMMAND$ variable. Clever ey?
That way, we only had to write ONE intermidiate app.
Go for it.

CHEERIO!



Fri, 21 Aug 1998 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. How do you make LARGE matrices in qbasic or qb 4.5

2. Help needed: QB 4.5 and TSR

3. need help: MSCDEX CD-ROM programming in QB 4.5

4. Need help printing LARGE reports with VB3.0 and Crystal Reports 4.5

5. Get command-line arguments in QB 4.5 ?

6. QB 4.5 Printer Commands

7. QB 4.5 for DOS, Command Line Options for BC.EXE

8. QB 4.0 Docs/QB 4.5 Wanted

9. want QB 4.5 QB 7.1 FOR FREE!!!

10. Where's QB.LIB in QB 4.5?

11. need entry form for qb 4.5

12. Need QB45ADVR.HLP file for QB 4.5!

 

 
Powered by phpBB® Forum Software