| see this |
| Sujit Patil replied to san san on Thursday, September 11, 2008 7:51 AM |
|
I dont think its possible in VB.net also. I am not sure but i think we cant use function like this.
May be something is going wrong.
Can you paste the code where you found this.
Best Luck!!!!!!!!!!!!! Sujit. |
| Reply Reply Using Power Editor |
| |
| |
Rank |
Winnings |
Points |
| November |
27 |
$0.00 |
7 |
| October |
9 |
$30.00 |
102 |
|
|
|
|
|
|
| solution |
| Raj Cool... replied to san san on Thursday, September 11, 2008 7:53 AM |
|
Hi,
Sometimes it is required based on your logic in the program. The FunctionReadData function must have returns some variable reference that will be used in the program in further steps. If you put the code for FunctionReadData and the some line after FunctionReadData = "Sucessfull" then I can tell you the exact things.
-Paresh
|
| Reply Reply Using Power Editor |
| |
| |
Rank |
Winnings |
Points |
| November |
28 |
$0.00 |
6 |
| October |
0 |
$0.00 |
0 |
|
|
|
|
|
|
| That is the return result not the declaration |
| Minhajul Shaoun replied to san san on Tuesday, September 23, 2008 5:25 PM |
|
Hello, I am writing a code so that you can understand. Through this code we will determine whether a number is greater that 5 or not. We will pass number into the function. The function will return "Successfull" if our passed number is greater than 5.
'Code begins here sub determine() Dim str as string str = determineresult(7) msgbox (str) end sub
Function determineresult (num1 as integer) dim returnresult as string if num1>5 then returnresult="Successfull" else returnresult="Unsuccessfull" End if Retrun returnresult End Function 'Code ends here
So, if the provided number is greater than 5 then the function will return a string value "Successfull". That value is not a function. That is only string variable. But it is rate to return string value from a function. The most common return value is Boolean.
|
| Reply Reply Using Power Editor |
| |
| |
Rank |
Winnings |
Points |
| November |
0 |
$0.00 |
0 |
| October |
0 |
$0.00 |
0 |
|
|
|
|
|
|
|