G2Basic 0.1.1 (1e793fc)
BASIC interpreter for microcontrollers
Loading...
Searching...
No Matches
g2basic.h
Go to the documentation of this file.
1
13/*--------------------------------------------------------------------------------------------------------------------*/
14/* SPDX-License-Identifier: MIT */
15/*--------------------------------------------------------------------------------------------------------------------*/
16#ifndef G2BASIC_H
17#define G2BASIC_H
18/*--------------------------------------------------------------------------------------------------------------------*/
30/*--------------------------------------------------------------------------------------------------------------------*/
52void g2basic_init(void (*print_func)(const char* str));
64void g2basic_set_number_output(void (*print_number)(double value));
66/*--------------------------------------------------------------------------------------------------------------------*/
108int g2basic_register_function(const char* name,
109 int arg_count,
110 double (*func_ptr)(double[], int));
112/*--------------------------------------------------------------------------------------------------------------------*/
171int g2basic_parse(const char* input, double* result, const char** error);
173/*--------------------------------------------------------------------------------------------------------------------*/
175/*--------------------------------------------------------------------------------------------------------------------*/
176#endif // G2BASIC_H
int g2basic_parse(const char *input, double *result, const char **error)
Process one line of input.
int g2basic_register_function(const char *name, int arg_count, double(*func_ptr)(double[], int))
Make a C function callable from BASIC expressions.
void g2basic_init(void(*print_func)(const char *str))
Reset the interpreter and set the text output callback.
void g2basic_set_number_output(void(*print_number)(double value))
Replace the formatter for numbers printed by PRINT.