Page 1 of 1

doubt about exit.

PostPosted: Tue Nov 06, 2012 7:34 pm
by VIJAY1
I gave a para like this
2200-insert-para
    perform 8000-read-para
2200-insert-para-exit.
    exit.

now i gave
perform 2200-insert-para thru 2200-insert-para-exit
     until num-of-copies = 0.

so in 8000-read-para
i wrote
perform 2200-insert-para-exit.

then where do the control go ?
and what happens.

Re: doubt about exit.

PostPosted: Tue Nov 06, 2012 7:38 pm
by BillyBoyo
No, please don't do that. If you just let the 8000- paragraph complete, you will automatically return to the statement after the PERFORM of 8000-.

It is absolutely vital that you understand how PERFORM works. Look in the manuals, and any other materials you have.

Re: doubt about exit.

PostPosted: Tue Nov 06, 2012 7:39 pm
by Pandora-Box
I would request you to add some displays in the code after every para starts with the para name so it would be easier to identify the flow of code at run time

Re: doubt about exit.

PostPosted: Tue Nov 06, 2012 7:43 pm
by NicC
Please use the code tags in the editor to make your code readable. Also, cut and paste your code thus avoiding errors whilst retyping. I have fixed both for you.

What is the problem? What are the rules about perform and what happens once it has done its work? Why would you try to execute in 8000 code from 2000. It should be the other way around. And why try to execue an exit anyway.

Finally - what happened when you tried? You did try, didn't you? with lots of DISPLAYs so that you could see what was happening?

Re: doubt about exit.

PostPosted: Tue Nov 06, 2012 7:45 pm
by Robert Sample
Why not test it yourself and find out? Put a
DISPLAY '<paragraph name'.
immediately after each paragraph name and run the program.

Re: doubt about exit.

PostPosted: Tue Nov 06, 2012 7:49 pm
by VIJAY1
I am on an assignment which i should submit in 2hrs.so in a hurry.sorry for the trouble.
so...even there is a perform thru and until of that para...when ever exit para of that statement gets encountered the control moves to next statement.?and dont repeats it right?

Re: doubt about exit.

PostPosted: Tue Nov 06, 2012 7:50 pm
by Robert Sample
A forum such as this is no place for responses in a hurry. People answer if / when they have the time. If you are in such a hurry, pay someone for the answer.

And if you are in too much of a hurry to read the manual -- as you have been directed to -- then there's no reason for us to provide you assistance.

Re: doubt about exit.

PostPosted: Tue Nov 06, 2012 7:52 pm
by NicC
If this is part of your assignment then you should be reading the manual and trying things out - not leaving it until the last minute and hoping someone will come up with an answer for you to sprout without understanding.

I feel like locking this as we are not here to do your assignments for you.