[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: global variables
From: |
Søren Hauberg |
Subject: |
Re: global variables |
Date: |
Fri, 26 May 2006 14:06:01 +0200 |
Okay. The following code works:
function whatever()
global DEBUG;
isglobal("DEBUG")
DEBUG
endfunction
global DEBUG = 0;
whatever()
and produces the following output:
ans = 1
DEBUG = 0
So, the trick is tell Octave that DEBUG is global in the function where
you want to access DEBUG.
Søren
fre, 26 05 2006 kl. 13:57 +0200, skrev address@hidden:
> you're right of course, sorry for this mistake..
> in the code it is written
>
> global DEBUG = 0;
>
> Michel
>
> Hi,
>
> fre, 26 05 2006 kl. 13:16 +0200, skrev address@hidden:
> > > Hi all
> > >
> > > I tried to set a variable global ..
> > >
> > > global DEGUB = 0;
> I'm guessing you ment to write:
> global DEBUG = 0;
>
> Søren
>
>
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave