Skip to content

How do you repeat a pattern until the end of a file? #1467

Discussion options

You must be logged in to vote
Event events[while(!std::mem::eof())] [[comment("Array of events")]];

make sure to also #include "std/mem.pat"
If you prefer you can do a similar construct to use size and read only so many bytes. Left as exercise to reader but will post the answer if requested. (hint: use $ to calculate the number of bytes read so far).

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@meint52
Comment options

@paxcut
Comment options

Answer selected by meint52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants