![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum 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 |
| Declaring Global Variables in KLD | int80h | BSD | 1 | 01-21-2008 05:11 AM |
| global variables in KLD (FreeBSD) | int80h | High Level Programming | 0 | 01-17-2008 04:14 PM |
| perl global variables | reggiej | Shell Programming and Scripting | 3 | 08-29-2005 05:18 AM |
| Reg. Local vs Global declarations | kms | High Level Programming | 2 | 05-02-2005 06:30 AM |
| Global variable becomes local | odashe318 | Shell Programming and Scripting | 2 | 10-29-2004 06:18 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Guys, how can I define global variables in sorlaris...cause I lose the values outside the scope.
Rite now wat I do is,I redirect variable value to a file n then get it back outside the function... Last edited by qzv2jm; 03-04-2008 at 12:10 AM. |
| Forum Sponsor | ||
|
|
|
|||
|
Are you talking about C?
Code:
int this_is_global=0;
void foo(void)
{
this_is_global=7;
}
int main()
{
printf("before: %d ", this_is_global);
foo();
printf(" after: %d\n", this_is_global);
}
Code:
echo $SHELL |