|
|
| Author |
Message |
muthukumar
New User
Joined: 24 Mar 2004 Posts: 32
|
|
|
|
I tried writing a recursive program with VS-COBOL II. I got the following error during run time.
IGZ0015S A recursive call was attempted to a program that was already active.
Does this mean VS-COBOL II does not support recursive functionality or else some problem with the functionality of my code.
find the code below
IDENTIFICATION DIVISION.
PROGRAM-ID. COBOL1.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WORK-NUM PIC 9(02) VALUE 1.
01 INCREM PIC 9(01) VALUE 5.
PROCEDURE DIVISION.
COMPUTE WORK-NUM = WORK-NUM * INCREM.
COMPUTE INCREM = INCREM - 1
CALL 'COBOL1'.
IF INCREM = 0
DISPLAY ' FACTORIAL ' WORK-NUM
GOBACK.
regards
Muthu |
|
| Back to top |
|
 |
References
|
Posted: Mon Apr 05, 2004 6:59 pm Post subject: Re: recursive program in vs-cobol |
 |
|
|
 |
mdtendulkar
Active User
Joined: 29 Jul 2003 Posts: 257 Location: USA
|
|
|
|
Hello muthukumar,
Take a look at the following link for more details and example on recursive programming.
Recursive Programming
Hope this helps
Regards
Mayuresh Tendulkar |
|
| Back to top |
|
 |
|
|