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

Permit pattern zero repeats #3603

Merged

Conversation

telephon
Copy link
Member

@telephon telephon commented Mar 25, 2018

This fixes #3002.

[edited]
This does not fix #3002. It merely permits patterns to be skipped if their repeats/length value is zero.

@telephon
Copy link
Member Author

Todo: add more patterns to the test suite.

@telephon
Copy link
Member Author

telephon commented Mar 25, 2018

  • Pseries
  • Pseg
  • Pstep
  • Pindex
  • Pgeom
  • Pprob
  • Pgbrown
  • Pbrown
  • Ppoisson
  • Pget
  • Pkey
  • Pgate
  • Pn
  • Pcauchy
  • Pdict
  • Peventmod
  • Pbeta
  • Pgauss
  • Ptime
  • Pgtpar
  • Pgpar
  • Ptpar
  • Ppar
  • Pwrand
  • Pdfsm
  • Pshuf
  • Ppatlace
  • Pser
  • Place
  • Pseq
  • Pslide
  • Ptuple
  • Prand
  • Pfpar
  • Pxrand
  • Pfsm
  • ListPattern
  • Pmeanrand
  • Plprand
  • Pexprand
  • Phprand
  • Pwhite
  • Pfuncn
  • Ppatmod

@telephon
Copy link
Member Author

ok, this should be ready for review now.

Copy link
Contributor

@mossheim mossheim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, but I'm not an expert here. :) Should documentation change because of this?

@mossheim mossheim added the comp: class library SC class library label Apr 4, 2018
@telephon
Copy link
Member Author

telephon commented Apr 5, 2018

Should documentation change because of this?

I suppose that it now just behaves as expected.

But I've looked at the help files a little. It would be worth documenting the *new method of most of thse patterns. Better some other time and in some other PR …

@telephon telephon changed the title Topic catch pattern zero repeats Permit pattern zero repeats Apr 5, 2018
Because counter is initialised to zero, this test is redundant.
Copy link
Contributor

@muellmusik muellmusik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks okay to me.

@muellmusik muellmusik merged commit abe2491 into supercollider:develop May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: class library SC class library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

patterns: catch zero repeats
3 participants