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

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

[Octave-patch-tracker] [patch #10299] new function: extractBefore


From: Nicholas Jankowski
Subject: [Octave-patch-tracker] [patch #10299] new function: extractBefore
Date: Thu, 8 Dec 2022 10:49:46 -0500 (EST)

Update of patch #10299 (project octave):

                 Summary:           extractBefore => new function:
extractBefore

    _______________________________________________________

Follow-up Comment #2:

thank you for this contribution. I haven't had time to look through  the code
yet, but some thoughts if you're interested in helping get the code adopted
into core octave:

1 - general practice here is to include m-files as attachments that can be
downloaded, rather than needing to copy/paste code.  

2 - Also, please review the Octave contributor guides
(https://wiki.octave.org/Contribute), in particular the m-file style guide:
https://wiki.octave.org/Octave_style_guide, and help text style guide:
https://wiki.octave.org/Help_text_style_guide

3 - feel free to look at any other octave functions as examples of how to
structure the function definitions, help text, etc. ('edit integral' provides
a decent example.)  

some immediate items of notice:
- Copyright block go first at the top , followed by texinfo formatted help,
etc.  
- As was noted in the contributor agreement on the patch tracker submission
page, octave core generally doesn't keep author in the copyright lines, but
author attribution can be noted after the help text (see 'edit repelem' for an
example).
- generally use # not % for comments, and ! not ~ for NOT. 
- the nargin check can just use print_usage() instead of a custom error.
- whitespace - separate operators and functions by a single space except in
the few cases that causes parsing problems (like within a [] array
definition)
- no need to do a return value handoff at the end. can just return 'text'
instead of creating an extractedText placeholder. 



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/patch/?10299>

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




reply via email to

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