/* * Prelude for the "used like this" fragment in README.md. * * The fragment is a run of CATCH calls, which only compile inside an ATTEMPT -- * that is the whole point of the macro protocol and the reason the fragment is * shown without its scaffolding. `host_set_string` is the third accessor the * surrounding prose says exists but does not print. */ #include #include #include #include static akbasic_Runtime SCRIPT; static const char *PROGRAM = "10 PRINT \"HI\"\n"; akerr_ErrorContext AKERR_NOIGNORE *host_set_int(akbasic_Runtime *obj, const char *name, int64_t value); akerr_ErrorContext AKERR_NOIGNORE *host_get_int(akbasic_Runtime *obj, const char *name, int64_t *dest); akerr_ErrorContext AKERR_NOIGNORE *host_set_string(akbasic_Runtime *obj, const char *name, const char *value); akerr_ErrorContext AKERR_NOIGNORE *akbasic_docs_fragment(void); akerr_ErrorContext AKERR_NOIGNORE *akbasic_docs_fragment(void) { PREPARE_ERROR(errctx); int64_t score = 0; ATTEMPT {