Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 4th, 2005, 1:08 AM   #1
dawn
Newbie
 
Join Date: Oct 2005
Posts: 1
Rep Power: 0 dawn is on a distinguished road
how to receive a value and pass it back ??

im having problems in writting a code for the executor part in grid computing which the executor need to receive a value from the deployment in core layer and execute it and pass it back after finish executing.
the problem is how to receive the value from and how to pass the result back? the coding is in C# by the way..

thanks..
dawn is offline   Reply With Quote
Old Oct 4th, 2005, 10:12 AM   #2
OpenLoop
Expert Programmer
 
OpenLoop's Avatar
 
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4 OpenLoop is on a distinguished road
I'm not sure what you're talking about, but here's an example where main passes a value to some function and then get the result back.
public static void main(string[] args)
{ 
    int TheValue = 5;                          //originally, TheValue=5
    TheValue = increase_it(TheValue);   //now TheValue=10
}

public int  increase_it(int AnyValue)
{
    AnyValue = AnyValue + 5;  //increment the received value by 5
    return AnyValue;              //return the new value
}
This is only one way to do it, passing by reference is another.
OpenLoop is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:28 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC