Path: news.mathworks.com!not-for-mail
From: "Yuri Geshelin" <geshelin@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: eval, feval, global
Date: Fri, 28 Mar 2008 13:39:02 +0000 (UTC)
Organization: Bedford Institute of Oceanography
Lines: 35
Message-ID: <fsisdm$pk$1@fred.mathworks.com>
References: <fsebf0$43u$1@fred.mathworks.com> <fsg56d$50c$1@fred.mathworks.com> <fsgmf0$fcd$1@fred.mathworks.com> <fsgoq2$qcf$1@fred.mathworks.com> <fsinpi$e2q$1@fred.mathworks.com>
Reply-To: "Yuri Geshelin" <geshelin@hotmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1206711542 820 172.30.248.35 (28 Mar 2008 13:39:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 28 Mar 2008 13:39:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1149396
Xref: news.mathworks.com comp.soft-sys.matlab:459659


Hi,

I think the problem can be the same as in the case of 
GLOBAL. As Matthew mentioned, it can make debugging an 
interesting task. I realize this now. You secure yourself 
from the guys who do not bother to use 'clear global', but 
you are still likely to make your own mistakes when there 
are dozens of variables are passed in many functions. In 
this sense, it's just another form of GLOBAL.

Yuri

"sfreeman " <crush35@gmx.net> wrote in message 
<fsinpi$e2q$1@fred.mathworks.com>...
> ...to come up with annother part of the original topic: 
> 
> As I have to work with code from guys, who do not bother 
to 
> use 'clear global', I have started to use 
> appdata(0,...) 
> with a structure instead of global variables in code 
> without GUI. Anybody knows about problems using it?
> 
> Regards,
> Rainer
> 
> PS: I agree on 'eval' as bad style and that it can be 
> replaced, even when I use str2num with GUI programming 
> quite often (which uses 'eval' ;o) - ).
> 'feval' I see frequently in "Libraries", which wrap 
several 
> functions into one file - are there better alternatives 
out 
> there.