Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove varargout in remaining functions #692

Open
dominikbach opened this issue Apr 19, 2024 · 0 comments
Open

Remove varargout in remaining functions #692

dominikbach opened this issue Apr 19, 2024 · 0 comments
Labels
Good First Issue Good for newcomers
Milestone

Comments

@dominikbach
Copy link
Contributor

dominikbach commented Apr 19, 2024

Summary

All functions should return static output (i.e. no use of varargout).
Some functions do not do this, including pspm_overwrite and pspm_prepdata.
This requires checking the entire codebase where these functions are called.

pspm_overwrite

  1. This is an internal function with no user-specified arguments. Thus, the output argument sts is not needed, and we can settle on one static output argument.
  2. There should be a third value for overwrite which signifies that the argument has not been set by the user.
  3. In case of this third value, the GUI should be enabled in case the file exists.
  4. pspm_options should use this third value as default.
  5. pspm_options should check the field .overwrite for all (and only for these) functions that create new files.
  6. Check all instances in PsPM where pspm_overwrite is called and ensure the output arguments are set appropriately.

pspm_prepdata

  1. This is an internal function but it checks a user-supplied struct variable and so requires input checking and a sts output.
  2. Thus, ensure a static output [sts, data, newsr].
  3. Check all instances in PsPM where pspm_prepdata is called and ensure the output arguments are set appropriately.

Other functions

Check all PsPM functions in the src folder and list all that use varargout.

@dominikbach dominikbach added the Good First Issue Good for newcomers label Apr 19, 2024
@dominikbach dominikbach added this to the v7.0 milestone May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant