![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Declaring Global Variables in KLD | int80h | BSD | 1 | 01-21-2008 09:11 AM |
| global variables in KLD (FreeBSD) | int80h | High Level Programming | 0 | 01-17-2008 08:14 PM |
| perl global variables | reggiej | Shell Programming and Scripting | 3 | 08-29-2005 08:18 AM |
| Reg. Local vs Global declarations | kms | High Level Programming | 2 | 05-02-2005 09:30 AM |
| Global variable becomes local | odashe318 | Shell Programming and Scripting | 2 | 10-29-2004 09:18 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | 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... ....theres obviously a better way of doing this...I now this is a basic question....but please help.....Last edited by qzv2jm; 03-04-2008 at 04:10 AM.. |
|
||||
|
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 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|