IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Return Statement


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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: 1306
Location: Vilnius, Lithuania

PostPosted: Sun Sep 20, 2009 12:02 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Sun Sep 20, 2009 12:55 pm
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
Reply with quote

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

Global Moderator


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

PostPosted: Sun Sep 20, 2009 8:52 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sun Sep 20, 2009 11:09 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Sep 21, 2009 2:16 pm
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
Reply with quote

oops..

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Sep 21, 2009 3:12 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
No new posts Relate COBOL statements to EGL statement All Other Mainframe Topics 0
No new posts REXX GETMSG does not return £HASP880... CLIST & REXX 2
Search our Forums:

Back to Top