From: Mason Freed on 23 Jun 2010 11:34 Thanks Yair and us - both interesting additions. I'll start using mlint with the -m2 option directly - nicer output format. There's a lot of information in the doli() output. Interesting. (Not too much use for me right now, but I'll keep it in the back of my head for later projects...) Thanks, Mason
From: Mason Freed on 23 Jun 2010 12:02 "Steven Lord" <slord(a)mathworks.com> wrote in message <hvr1us$n9v$1(a)fred.mathworks.com>... > > For that check, you will want to use ISVARNAME. That will detect if the > name of your script or function file violates any of these rules: > > 1) Names must be NAMELENGTHMAX or fewer characters > 2) Names must start with a letter > 3) Names must contain only letters, numbers, and underscore > 4) Names must not be a keyword (see ISKEYWORD) Great tip - thanks Steve.
From: Mason Freed on 23 Jun 2010 13:12 "Mason Freed" <mfreedREMOVETHIS(a)mfreedREMOVETHIS.com> wrote in message <hvtb6d$lqn$1(a)fred.mathworks.com>... > "Steven Lord" <slord(a)mathworks.com> wrote in message <hvr1us$n9v$1(a)fred.mathworks.com>... > > > > For that check, you will want to use ISVARNAME. That will detect if the > > name of your script or function file violates any of these rules: > > > > 1) Names must be NAMELENGTHMAX or fewer characters > > 2) Names must start with a letter > > 3) Names must contain only letters, numbers, and underscore > > 4) Names must not be a keyword (see ISKEYWORD) > > Great tip - thanks Steve. Actually, I found a flaw in this idea: isvarname('end') is 0. However, in a class folder, end.m is a valid overload for the end function. I think I'm just going to implement #1-#3 above, and leave out #4. Thanks, Mason
First
|
Prev
|
Pages: 1 2 3 4 5 Prev: Loading a very long excel file on a Mac platform Next: guide de matlab |