| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Rexx |
* Reply to message in Sysop's Personal Mail Hello Francois! Replying to a message of Francois Thunus to Steven Cox: FT> nope. Return is just what the procedurue should return to the call so FT> what happens is that when you run the program factorial is called FT> with 5 as an argument. It calls factorial with 4 as an argument; FT> That calls factorial with 3 as an argument that calls FT> factorial with 2 then factorial with 1 then FT> factorial with 0 bingo ! the procedure has the answer: that's 1 FT> the answer is sent back (returned) to the previous level: answer is FT> factorial(1) can now be processed; It is 1*1 the answer is returned FT> to previous level which can be processed: factorial(2) is 2*1 FT> answer is returned to previous level factorial (3) is treated: FT> it's 3*2, answer is returned to previous level factorial(4) is FT> processed: it's 4*6, answer is returned to previous level factorial 5 FT> is processed: it's 5*24, ie 120. FT> the problem is solved. Now I understand!! I will go back & finish that lesson now. Thanks so much for your help, Steven --- FleetStreet 1.03 NR==LoraBBS OS/2 v2.40+* Origin: Information Exchange, Houma, LA. (504)872-4275 (1:384/14) SEEN-BY: 270/101 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809 @PATH: 384/14 1 3615/50 396/1 270/101 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.