Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What does "%#ok<NASGU>" mean?

511 views
Skip to first unread message

Zhiguo

unread,
Mar 28, 2008, 7:12:39 AM3/28/08
to
In matlab codes, I often see the following comments:

%#ok<NASGU>

or,

%#ok<NOPRT,NASGU>

What do they mean?

Thanks a lot!

John D'Errico

unread,
Mar 28, 2008, 7:30:04 AM3/28/08
to
Zhiguo <Zhigu...@gmail.com> wrote in message <99c14e82-8e42-4ab2-
a0af-62e...@d21g2000prf.googlegroups.com>...

The %#ok part is an mlint flag. These flags tell
the mlint tool not to worry about those specific
lines of code.

John

Zhiguo

unread,
Mar 28, 2008, 8:29:52 AM3/28/08
to
On Mar 28, 7:30 pm, "John D'Errico" <woodch...@rochester.rr.com>
wrote:
> Zhiguo <ZhiguoYo...@gmail.com> wrote in message <99c14e82-8e42-4ab2-
>
> a0af-62e940358...@d21g2000prf.googlegroups.com>...

>
> > In matlab codes, I often see the following comments:
>
> > %#ok<NASGU>
>
> > or,
>
> > %#ok<NOPRT,NASGU>
>
> > What do they mean?
>
> The %#ok part is an mlint flag. These flags tell
> the mlint tool not to worry about those specific
> lines of code.
>
> John

Thanks for your reply. You are very helpful.

^_^

Doug Schwarz

unread,
Mar 28, 2008, 8:29:56 AM3/28/08
to
In article <fsikrs$od$1...@fred.mathworks.com>,

And the part in brackets <> indicates the specific "transgression" to
ignore. I couldn't find in the help what they all are, but if you
remove the whole comment, mlint will tell you.

--
Doug Schwarz
dmschwarz&ieee,org
Make obvious changes to get real email address.

0 new messages