× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Cobol 400 (NOT ILE COBOL) does support recursive calls.
 
Here enclosed you may find an example.
Sincerely

Domenico Finucci
Fiditalia , Milano, 02- 4301-2494

-----Messaggio originale-----
Da: Refaie.Heba@khb.hu [mailto:Refaie.Heba@khb.hu]
Inviato: marted́ 10 aprile 2001 11.45
A: MIDRANGE-L@midrange.com; MIDRANGE-L@midrange.com
Oggetto: recursion calls


Hello Group,


       What are the programming language on the AS/400 that support the recursion calls of a function or a program?

Could anybody post me a recursive fuction call example code.

Thanks in advance
Heba





       
       IDENTIFICATION DIVISION.
       PROGRAM-ID.    URECURSE.
       AUTHOR.        DFINUCCI.
       DATE-WRITTEN.  24/11/1999.
      * ----------------------------------------------------------
      * ----------------------------------------------------------
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SOURCE-COMPUTER. IBM-AS400.
       OBJECT-COMPUTER. IBM-AS400.
       SPECIAL-NAMES.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
       DATA DIVISION.
       FILE SECTION.
      *
      *
       WORKING-STORAGE SECTION.
       01 max-num    pic 9(3) value 20.
       LINKAGE SECTION.
       01 NUMERO PIC 9(3).
      ** ----------------------------------------------------
       PROCEDURE DIVISION USING NUMERO.
       MAIN.
           IF NUMERO GREATER ZERO
              ADD 1 TO NUMERO
           END-IF.
           DISPLAY 'NUMERO ' NUMERO
           IF NUMERO LESS    max-num
              CALL 'URECURSE'  USING NUMERO
           END-IF.
           GOBACK.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.