Enums§
- Base
- The numeric base used when displaying integer-valued scalars.
- Expr
- An expression node in the AST.
- Format
Mode - Controls how numbers are displayed (MATLAB-compatible format modes).
- Op
- A binary operator used in
Expr::BinOp.
Functions§
- autoload_
cache_ insert - Inserts a function into the autoload cache. Called by
exec::try_autoload. - builtin_
names - Names of all built-in functions recognized by [
call_builtin]. - current_
func_ name - Returns the name of the currently executing function (top of
FUNC_NAME_STACK). - eval
- Evaluates an expression without file I/O context. This is the public API used by tests and non-I/O evaluation paths.
- eval_
with_ io - Evaluates an expression with an I/O context (file descriptor table).
Used by the REPL to support
fopen/fclose/fgetl/fgets/fprintf(fd,...). - expr_
to_ string - Reconstructs a source-like string from an
Expr. - format_
complex - Formats a complex number
re + im*ifor display. - format_
non_ dec - Formats a number in a non-decimal integer base (hex/bin/oct). Rounds to the nearest integer before formatting.
- format_
number - Formats a number for display: integers without decimal point, floats with up to 10 significant fractional digits, trailing zeros trimmed. Always decimal — used for expression re-display, not user-facing output.
- format_
printf - Formats
argsusing a C-stylefmtstring. - format_
scalar - Formats a scalar
f64for user-facing output using the given base and format mode. - format_
value - Formats a
Valuecompactly: scalars as a number string, matrices as[NxM double]. - format_
value_ full - Returns
Nonefor scalars, complex numbers, strings, and void (displayed inline or suppressed);Some(full_string)for matrices (MATLAB-style column-aligned display). - get_
display_ base - Returns the current numeric base stored in the thread-local context.
- get_
display_ compact - Returns the current compact flag stored in the thread-local context.
- get_
display_ fmt - Returns the current display format mode stored in the thread-local context.
- get_
last_ err - Returns the last-error string.
- global_
declare - Declares
nameas global in the current scope. - global_
frame_ pop - Pops the top global-names frame (called on function exit by
exec.rs). - global_
frame_ push - Pushes an empty global-names frame (called on function entry by
exec.rs). - global_
get - Gets a value from the shared global store.
- global_
init_ if_ absent - Initialises
namein the global store toScalar(0.0)if not already present. - global_
refresh_ into_ env - Refreshes all names declared global in the current scope from
GLOBAL_ENVintoenv. - global_
set - Sets a value in the shared global store.
- is_
global - Returns
trueifnameis declared global in the innermost active scope. - is_
persistent - Returns
trueifnameis declaredpersistentin the current function frame. - load_
mat_ file - Loads a MATLAB Level 5/7 MAT file and returns a
Value::Struct. - persistent_
declare - Declares
nameas persistent in the current function scope. - persistent_
frame_ pop - Pops the persistent frame and returns
(func_name, declared_persistent_names). - persistent_
frame_ push - Pushes a function scope for persistent tracking (called on function entry).
- persistent_
load - Gets a saved persistent value for
(func_name, var_name). - persistent_
save - Saves a persistent value for
(func_name, var_name). - resolve_
autoloaded - Returns an autoloaded function by name, triggering the autoload hook if needed.
- rng_
seed - Reseeds the thread-local RNG with the given 64-bit seed.
- rng_
shuffle - Reseeds the thread-local RNG from OS entropy.
- set_
autoload_ hook - Registers the autoload hook. Called by
exec::init(). - set_
display_ ctx - Sets the display context used when executing function bodies.
- set_
fn_ call_ hook - Registers the hook that executes named user-defined functions.
- set_
last_ err - Sets the last-error string (called on every caught runtime error).
- set_
nargout - Sets the number of output values requested by the calling assignment statement.
Type Aliases§
- Autoload
Hook - Signature for the hook that auto-loads a function file by name.
- FnCall
Hook - Signature for the hook that executes named user-defined functions.