Skip to content

Releases: tiborsimon/simple-input-parser

Simple Input Parser v2.0.0

13 Oct 21:39
Compare
Choose a tag to compare

Changes

  • Fully reworked bulk mode handling
  • New, cleaner error handling
  • Flag mode removed, only extra flag mode will be available
  • Release package is packaged with the new MATLAB Library System v2.3.0

Simple Input Parser v1.4.1

21 Aug 00:27
Compare
Choose a tag to compare

Changes

  • README.md links updated

Simple Input Parser v1.4.0

20 Aug 23:56
Compare
Choose a tag to compare

Changes

  • Removed MATLAB Library System integration at repo level. Only the release is wrapped around with the library system.
  • Small typo correction

Simple Input Parser v1.3

17 Jun 17:53
Compare
Choose a tag to compare

Modifications

  • MATLAB Library System added
  • Demo mode added with by calling with parameters

Extra flag mode and custom validator error message support added

30 May 07:23
Compare
Choose a tag to compare

Extra flag mode

From now, you can ask for a flag structure any time by using a second output variable during the parser API function call:

function ret = my_function( varargin )

    params.a = 0;
    params.b = 0;
    params.c = 0;

    [params, flags] = simple_input_parser(flags, varargin);

    % if a value was parsed, it's corresponding field in the flags structure will 
    % be assigned to one unlike the previous flag mode, it is not necessary to 
    % truncate the varargin parameter to it's firts element the flag generation 
    % will work during other modes as well

    % further functionalities

end

Cutom validator error message

A minor upgrade was applied to the custom validator functions as well for supporting custom error messages.
IMPORTANT : error messages are mandatory output variables for the validator functions

function ret = my_function( varargin )

    params.a = 0;
    params.b = 0;
    params.c = 0;

    function [validflag, errormsg] = validate_c(value)
        errormsg = 'Parameter c has to be greater than 1..';
        validflag = value > 1;
    end

    validators.b = @validate_c;

    params = simple_input_parser(params, varargin, validators);

    % further functionalities

end

[Bug] Extra flag mode and custom validator error message support added

29 May 21:42
Compare
Choose a tag to compare
v1.1

Update README.md

Initial MATLAB port

02 May 21:57
Compare
Choose a tag to compare

This release contains the initial MATLAB port. Further ports are coming soon.