|
Prev: Fibonacci program
Next: Accessing a VSAM file
From: Paolo on 2 Nov 2005 09:48 Hi, i've a big problem with the recursives call under Fujitsu Cobol.Net. It'happen an exception for recursive call and i don't know how to resolve it! Do it exist a work-around for this problem? thank's
From: Judson McClendon on 2 Nov 2005 11:06 "Paolo" <paolo.sanzotta(a)gmail.com> wrote: > Hi, > i've a big problem with the recursives call under Fujitsu Cobol.Net. > It'happen an exception for recursive call and i don't know how to > resolve it! > Do it exist a work-around for this problem? > thank's More detail! Is this a compiler syntax issue, or a runtime issue? What is the code that is giving the trouble? -- Judson McClendon judmc(a)sunvaley0.com (remove zero) Sun Valley Systems http://sunvaley.com "For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life."
From: Chuck Stevens on 2 Nov 2005 11:46 Note that within COBOL that is compliant with the three most recent standards, both direct and indirect recursion is prohibited. If an implementor allows it (or provides additional syntax to support it), it's an extension and it does whatever the implementor says it does. The draft standard proposed for 2008 allows the RECURSIVE clause in the PROGRAM-ID paragraph, and programs so marked may be called when they are already active, and may call themselves directly or indirectly. Those that aren't can't. -Chuck Stevens ANSI X3.23-1974, ANSI X3.23-1985, and ISO/IEC "Paolo" <paolo.sanzotta(a)gmail.com> wrote in message news:1130942928.070790.49860(a)g47g2000cwa.googlegroups.com... > Hi, > i've a big problem with the recursives call under Fujitsu Cobol.Net. > It'happen an exception for recursive call and i don't know how to > resolve it! > Do it exist a work-around for this problem? > thank's >
From: Rick Smith on 2 Nov 2005 12:55 "Chuck Stevens" <charles.stevens(a)unisys.com> wrote in message news:dkaqgc$tkf$1(a)si05.rsvl.unisys.com... > Note that within COBOL that is compliant with the three most recent > standards, both direct and indirect recursion is prohibited. If an > implementor allows it (or provides additional syntax to support it), it's an > extension and it does whatever the implementor says it does. > > The draft standard proposed for 2008 allows the RECURSIVE clause in the > PROGRAM-ID paragraph, and programs so marked may be called when they are > already active, and may call themselves directly or indirectly. Those that > aren't can't. Mr Stevens, I believe the capability you state for the draft standard are already in ISO/IEC 1989:2002. See 8.6.5, Common, initial, and recursive attributes which states, in part, "A recursive program may call itself directly or indirectly. The program's internal data is initialized as described in 14.5.2, State of a function, method, object, or program. The recursive attribute is attained by specifying the RECURSIVE clause in the program's identification division." and 11.9 PROGRAM-ID paragraph, General rule 4, "The RECURSIVE clause specifies that the program and any programs contained within it are recursive. The program may be called while it is active and may call itself. If the RECURSIVE clause is not specified in a program or implied for a program, the program shall not be called while it is active."
From: William M. Klein on 2 Nov 2005 13:29
Chuck, I agree with Rick (and it was also RECURSIVE - as well as OO - that explains why Local-Storage was added in the '02 Standard). Having said that, I know of no "fully conforming" '02 Standard compiler - but do know of several that have the "IS RECURSIVE" syntax and semantics implemented. -- Bill Klein wmklein <at> ix.netcom.com "Rick Smith" <ricksmith(a)mfi.net> wrote in message news:11mhvkqo0ibbv59(a)corp.supernews.com... > > "Chuck Stevens" <charles.stevens(a)unisys.com> wrote in message > news:dkaqgc$tkf$1(a)si05.rsvl.unisys.com... >> Note that within COBOL that is compliant with the three most recent >> standards, both direct and indirect recursion is prohibited. If an >> implementor allows it (or provides additional syntax to support it), it's > an >> extension and it does whatever the implementor says it does. >> >> The draft standard proposed for 2008 allows the RECURSIVE clause in the >> PROGRAM-ID paragraph, and programs so marked may be called when they are >> already active, and may call themselves directly or indirectly. Those > that >> aren't can't. > > Mr Stevens, I believe the capability you state for the > draft standard are already in ISO/IEC 1989:2002. > See 8.6.5, Common, initial, and recursive attributes > which states, in part, "A recursive program may call > itself directly or indirectly. The program's internal data > is initialized as described in 14.5.2, State of a function, > method, object, or program. The recursive attribute is > attained by specifying the RECURSIVE clause in the > program's identification division." and 11.9 PROGRAM-ID > paragraph, General rule 4, "The RECURSIVE clause > specifies that the program and any programs contained > within it are recursive. The program may be called while > it is active and may call itself. If the RECURSIVE clause > is not specified in a program or implied for a program, > the program shall not be called while it is active." > > > |