|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Function call -- by value or by reference |
« View previous topic :: View next topic » |
Author |
Message
|
vijaishree |
Posted: Thu Feb 12, 2004 3:30 am Post subject: Function call -- by value or by reference |
|
|
Newbie
Joined: 11 Feb 2004 Posts: 6
|
Hi,
in languages like C, function calls can be made by value or by reference. When we make a function call in EQSL, is that by value or by reference ?
If by value, then how do we make calls by reference ?
Thanks ! |
|
Back to top |
|
 |
mgk |
Posted: Thu Feb 12, 2004 5:53 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Actually in C all calls are by value, even when you pass a pointer, a copy of the pointer is passed, (it's just hard to tell the difference) but the effect is a by reference semantic.
ESQL has direction types in the parameters to procedures, but not functions, so call-by-reference is not supported for functions, as we did not want functions with side-effects. So use to a call-by-reference semantic, use a procedure, and use INOUT direction for the parameter.
Cheers, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
vijaishree |
Posted: Mon Feb 16, 2004 2:35 am Post subject: |
|
|
Newbie
Joined: 11 Feb 2004 Posts: 6
|
Hi mgk,
thanks for that response !! |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|