[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Recursive function in SQRW



Hi,

        I never needed to implement recursive functions for any
practical purposes in SQR, but it's possible to implement. I don't think
global variables should cause any problems in general.

Here is sample example:

begin-report
  do test1 ! This is called recursively later.
  let #count=0
end-report

begin-procedure test1
let #count=#count+1
if #count > 12   ! test condition to come out of SQR
  STOP
else
  display 'Now in test1'
  display #count
  do test1   ! Call same procedure
end-if
end-procedure


Above is very simple example, but it can be coded for complex tasks too.

Hope it helps,
-Sameer

-----Original Message-----
From: *Sehat Rosny [mailto:SRosny@SMTPGW.ARMS.OHIO-STATE.EDU]
Sent: Monday, October 05, 1998 11:11 AM
To: Multiple recipients of list SQR-USERS
Subject: Recursive function in SQRW


Hello

        Have any one of you ever
implement recursive procedure in SQRW ?
Or is it possible to do recursive in SQRW?
(the global variable of SQRW made recursive
 hard to implement)

thank you in advance.
any comment is welcome

bye
Sehat Rosny
PeopleSoft and SQRW Developer