Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Returning two values
05-07-2008, 07:25 PM
Post: #1
Returning two values
Hi
Is it possible to return two values from a procedure. I want to return a String and a float from procedure is it possible then how............?
Find all posts by this user
Quote this message in a reply
05-12-2008, 06:47 PM
Post: #2
RE: Returning two values
Hey

check out this method

global proc string[] testProc() {
string $result[];

$result[0] = string(23); // promote the float value of 23 to a string
$result[1] = "pSphere1"; // standard string in the next slot

return $result; // return the array
}

testProc();
Visit this user's website Find all posts by this user
Quote this message in a reply
03-09-2011, 01:14 PM
Post: #3
RE: Returning two values
In css we can returning to value by the code given below

global proc string[] testProc()
{
string $result[];

$result[0] = string(10); // promote the float value of 10 to a string
$result[1] = "pSphere1"; // standard string in the next slot

return $result; // return the array
}

testProc();
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)