[ prog / sol / mona ]

prog


Monads,Async/Await : Algebraic Effects in C99

16 2021-01-14 13:16

>>15
C preprocessor doesn't have random values(COUNTER and LINE are predictable integers)
but to remove an element from arglist
you can use removenth/removernth in https://github.com/FrozenVoid/C-headers/blob/main/argmanip.h

17 2021-01-14 13:45

Its possible to forward a random value from bash into gcc
argument though.
gcc prog.c -D RND_VAL=$RANDOM
or for specific list size
gcc prog.c -D RND_VAL="$(calc $RANDOM%LIST_LEN)"

18 2021-01-14 13:56

Minor correction it will have to be 1-based since i wrote nth as starting with 1st.
gcc prog.c -D RND_VAL="$(calc $RANDOM%LIST_LEN+1)"

69


VIP:

do not edit these