Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Return Statement

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
ganeshprasanna

New User


Joined: 21 Feb 2009
Posts: 36
Location: South Portland, Maine

PostPosted: Sun Sep 20, 2009 10:54 am    Post subject: Return Statement
Reply with quote

a = 5
call sum
say result
exit
sum:
b= 5
a = a + b
return

What would be the output of this?

"The subroutine should process a RETURN instruction, and at that point control returns to the clause following the original CALL. If the RETURN instruction specified an expression, the variable RESULT is set to the value of that expression. Otherwise, the variable RESULT is dropped (becomes uninitialized)"
Back to top
View user's profile Send private message

prino

Senior Member


Joined: 07 Feb 2009
Posts: 1028
Location: Oostende, Belgium

PostPosted: Sun Sep 20, 2009 12:02 pm    Post subject:
Reply with quote

Holy sith, why the fluffing hell do you bother us with this when it would take you all of 15 seconds to fluffing try it yourself?

RTFM!
Back to top
View user's profile Send private message
ganeshprasanna

New User


Joined: 21 Feb 2009
Posts: 36
Location: South Portland, Maine

PostPosted: Sun Sep 20, 2009 12:09 pm    Post subject:
Reply with quote

Hey dude..

Chill man.. you need not be that verbose. i am trying to learn REXX. Very much new to it. i do not have access to REXX on my Box.. just reading the manuals and some code snippets. well if its bothering you a lot, just ignore.. i know its a silly question for rexx gods out there. Its better to ask than to be ignorant. I went through the manuals(posted an extract).

And I DID READ THE F MANUALS
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Sun Sep 20, 2009 12:55 pm    Post subject:
Reply with quote

What do you think that the result would be and why, and if you are wrong we will endevour to explain.
Back to top
View user's profile Send private message
ganeshprasanna

New User


Joined: 21 Feb 2009
Posts: 36
Location: South Portland, Maine

PostPosted: Sun Sep 20, 2009 12:57 pm    Post subject:
Reply with quote

I think its either "RESULT" or 0...
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2058
Location: Silicon Valley

PostPosted: Sun Sep 20, 2009 8:52 pm    Post subject: Reply to: Return Statement
Reply with quote

Quote:
What do you think that the result would be and why,

And why?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10276
Location: italy

PostPosted: Sun Sep 20, 2009 11:09 pm    Post subject: Reply to: Return Statement
Reply with quote

why don' t You install a Rexx interpreter on Your PC ??

Regina-REXX would be the simpler choice, and You could run al kinds of experiments
Back to top
View user's profile Send private message
ganeshprasanna

New User


Joined: 21 Feb 2009
Posts: 36
Location: South Portland, Maine

PostPosted: Mon Sep 21, 2009 2:03 pm    Post subject:
Reply with quote

Thanks a lot enrico

Regina-Rexx is a nice utility.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10276
Location: italy

PostPosted: Mon Sep 21, 2009 2:16 pm    Post subject: Reply to: Return Statement
Reply with quote

Quote:
Regina-Rexx is a nice utility.


please review Your IT dictionary/vocabulary...
Regina_REXX is not an utility
REXX is a programming language and is processed by an interpreter,
Regina_REXX is one of them
Back to top
View user's profile Send private message
ganeshprasanna

New User


Joined: 21 Feb 2009
Posts: 36
Location: South Portland, Maine

PostPosted: Mon Sep 21, 2009 2:29 pm    Post subject: Reply to: Return Statement
Reply with quote

oops..

Thanks again for the correction
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10276
Location: italy

PostPosted: Mon Sep 21, 2009 3:12 pm    Post subject: Reply to: Return Statement
Reply with quote

REXX is my preferred programming language
and is also one of the smartest around,
when I hear or read something wrong about it
I just cannot resist flaming icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ON 2 AND EVERY 1 - Statement ??? UmeySan COBOL Programming 2 Tue Jul 25, 2017 1:20 pm
No new posts EXIT or RETURN cvnlynn CLIST & REXX 16 Wed Jul 19, 2017 2:50 am
No new posts QUESTION: RETURN CHANNEL pahiker CA Products 21 Thu Apr 20, 2017 12:31 am
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us