[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: global variables
From: |
st.michal88 |
Subject: |
Re: global variables |
Date: |
Wed, 22 Jan 2014 09:48:28 -0800 (PST) |
I thought that problem is solved and in easy case it works but I can not find
the answer why it doesn't in my case. Can you please have a look at this?
test2.m :
global var A;
test1.m :
function test1
test2;
global var A;
ext=".txt";
nr = readdir (pwd)
a=input("File number: ");
if isempty(a)==1
return
endif
if (isdir(nr(a))==0)
if (index(nr(a),ext)!=0)
data = fopen (nr(a), "r");
A=dlmread(data,'',0,0);
isglobal("A")
fclose(data);
isglobal("A")
name=nr{a,1};
endif
endif
endfunction
After that variable A does not exist.
--
View this message in context:
http://octave.1599824.n4.nabble.com/global-variables-tp4661206p4661271.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Re: global variables, (continued)
- Re: global variables, st.michal88, 2014/01/21
- Re: global variables, louis scott, 2014/01/21
- Re: global variables, Doug Stewart, 2014/01/21
- Re: global variables, Michal Studniarek, 2014/01/21
- Re: global variables, Jose, 2014/01/21
- Re: global variables, Mike Miller, 2014/01/21
- Re: global variables, Michal Studniarek, 2014/01/21
- Re: global variables, st.michal88, 2014/01/22
- Re: global variables, st.michal88, 2014/01/22
- Re: global variables, Doug Stewart, 2014/01/22
- Re: global variables,
st.michal88 <=
- Re: global variables, c., 2014/01/22