octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #59405] Feature request: new arguments block s


From: Rik
Subject: [Octave-bug-tracker] [bug #59405] Feature request: new arguments block syntax for argument validation
Date: Thu, 5 Nov 2020 11:04:05 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36

Follow-up Comment #3, bug #59405 (project octave):

Interestingly, I just checked 


iskeyword ('arguments')


and it returns false on Matlab.  According to the documentation,


Functions define argument validation in code blocks that are delimited by the
keywords arguments and end. If used, an arguments block must start before the
first executable line of the function.


Thus, in terms of implementation, I think it will need to go with the parser
when it detects a function prototype.  Octave would then need to search for
one or more optional arguments/endarguments blocks, and when the first line of
executable code is found drop back to normal interpretation.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59405>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]