Path: news.mathworks.com!not-for-mail
From: "Adam " <king@cs.fairfield.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Syntax checking
Date: Sun, 3 May 2009 18:32:01 +0000 (UTC)
Organization: Fairfield University
Lines: 10
Message-ID: <gtknv1$mr4$1@fred.mathworks.com>
Reply-To: "Adam " <king@cs.fairfield.edu>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1241375521 23396 172.30.248.37 (3 May 2009 18:32:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 3 May 2009 18:32:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1747716
Xref: news.mathworks.com comp.soft-sys.matlab:537060


Hi all,

I am programming a toolbox and I have the following question:

Does matlab have any built in functions to confirm the correct syntax for a call to ones own function. For example, it would be nice to specify that the function needs either an array followed by a cell array, or, just the string 'all', or two strings where the first one is not 'all', etc...

If matlab had this, then one could easily put all syntax checking up front, and also expect to get nice error messages.

Thank you!
   Adam