![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| need to return value from function | darshakraut | Shell Programming and Scripting | 5 | 05-14-2008 05:13 AM |
| function return array | dophine | Shell Programming and Scripting | 6 | 05-06-2008 09:16 AM |
| Function call not return value into var | katzs500 | UNIX for Advanced & Expert Users | 4 | 04-21-2008 10:27 AM |
| Function call not return value into var | katzs500 | UNIX for Dummies Questions & Answers | 1 | 04-18-2008 06:31 PM |
| ORACLE return a function to Solaris | Rafael.Buria | Shell Programming and Scripting | 1 | 10-23-2007 02:38 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
return value of a function
Hi
I have a doubt in the way the variables inside a function are treated . if a function is called from the main script directly, the variables inside them act as global variables. however if the return value of the function is stored to some other variable in the main script as shown, x=`some_function $some_args` then all the variables in the function become local ones. they are not relected in the main script. thnx in advance.... |
| Forum Sponsor | ||
|
|
|
|||
|
Quote:
2. It's more useful as so you *can* have functions that change global variables. 3. It means it does not have to fork() another process to do the job. |
|||
| Google UNIX.COM |