To the best of my knowledge, the easiest way is to use "QUIT TO" instead of
"RUN" for example

Using the nested approach:
--This is the main program - main_program.asc
-- some code to select an option  - vopt
SWITCH (.vopt)
CASE 1
RUN  application_1.asc
CASE 2
        EXIT
ENSW
EXIT

-- This is application_1.asc
--  Code to run  your application
RETURN

The driving program (main_program.asc) calls application_1.asc via "RUN'
command; when application_1.asc completes, it returns control to the calling
program (main_program.asc) via the "RETURN" command; this creates at least 2
levels of file depth as other commands may create additional levels

Using the non-nested approach
--This is the main program - main_program.asc
-- some code to select an option  - vopt
SWITCH (.vopt)
CASE 1
QUIT TO application_1.asc
CASE 2
        EXIT
ENSW
EXIT


-- This is application_1.asc
--  Code in your application
QUIT TO main_program.asc


The driving program (main_program.asc) calls application_1.asc and
main_program.asc ends, thus resetting the file depth; application_1.asc runs
and when completed goes back to main_program.asc. You can go as many levels
as you want with this approach as the file depth resets (at least partially)
after each change. Two drawbacks from this approach:
1. When you quit the first program and pass control to the next program, the
screen disappears before the "QUIT TO" program starts..
2. When you have an error in one of the lower levels, the entire application
ends as all the lower level programs are running independently, rather than
going back to the calling program. Of course you can always program error
checking code to send control back to the calling program.
I am currently using the second approach but I am considering going back to
the first to avoid screen discontinuity when switching programs. In the past
I have always set my file depth to 40 with no problems, with current
computers having plenty of memory, I have not found this to be an issue.

Javier Valencia, PE
President
Valencia Technology Group, L.L.C.
14315 S. Twilight Ln., Suite #14
Olathe, KS  66062-4571
(913)829-0888
(913)649-2904 FAX

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of J. Stephen Wills
Sent: Friday, July 05, 2002 2:03 PM
To: RBase List Server
Subject: Calculating Depth (FILE, not Personal Character)

Hope everyone (around the world) had a good 4th.

Okay, I suspect this is pretty basic, but I'm not sure how to do it
(exactly).  How do you calculate FILE DEPTH?  I don't mean the SETTING, but
rather how deeply "called"/nested I (my routines) are.  Then, could y'all
advise me on how to reduce the level of "called"-ness, if you'll pardon the
construction.  That is, could I take all these separate (source) files I'm
calling and use Application Express/Codelock to reduce this level?

As you might surmise, I'm having some problems.  When I have FILE DEPTH = 5,
I "lose" certain functionality, this functionality being contained in the
called file-modules.  When I call them fm a "lower" level, they work.  Then
I changed FILE DEPTH = 10, and re-ran the app "from the top" - well, bust my
breeches, it worked.  So, while I think I better understand the problem, I
sure appreciate some input on the various/best ways to address it.

Thanks,
Steve in Memphis

================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to