Add native RND and ASC functions
Some checks failed
akbasic CI Build / cmake_build (push) Failing after 40s
akbasic CI Build / sanitizers (push) Failing after 41s
akbasic CI Build / coverage (push) Failing after 49s
akbasic CI Build / mutation_test (push) Has been cancelled
akbasic CI Build / akgl_build (push) Has been cancelled
Some checks failed
akbasic CI Build / cmake_build (push) Failing after 40s
akbasic CI Build / sanitizers (push) Failing after 41s
akbasic CI Build / coverage (push) Failing after 49s
akbasic CI Build / mutation_test (push) Has been cancelled
akbasic CI Build / akgl_build (push) Has been cancelled
Implement bounded random integers with lazy clock seeding and add ASC as the inverse of CHR. Cover dispatch, validation, deterministic LCG output, UTF-8 round trips, function reference, and the breakout tutorial. Closes #16. Co-authored-by: andrew <andrew@aklabs.net>
This commit is contained in:
@@ -252,6 +252,11 @@ typedef struct akbasic_Runtime
|
||||
*/
|
||||
int64_t timems;
|
||||
|
||||
/* RND's lazy seed state. The flag distinguishes an unseeded run from a
|
||||
* legitimate LCG state of zero. */
|
||||
int64_t rndseed;
|
||||
bool rndseeded;
|
||||
|
||||
/*
|
||||
* Set by a branch that has decided the remaining statements on its line
|
||||
* belong to the arm it did not take, and cleared at the top of every line.
|
||||
|
||||
Reference in New Issue
Block a user