Workspace persistence — save / load (ASCII + matio v5 .mat). More...
#include <nk/value/span.hpp>#include <nk/value/value.hpp>Go to the source code of this file.
Functions | |
| void | nk::runtime::save (Engine &engine, Environment &env, Span< const Value > args) |
| Save workspace variables to an ASCII file (save filename var1 var2 ...). | |
| void | nk::runtime::load (Engine &engine, Environment &env, Span< const Value > args, size_t nargout, Span< Value > outs) |
| Load workspace variables from an ASCII file (load filename / S = load(filename)). | |
Workspace persistence — save / load (ASCII + matio v5 .mat).
Companion to the session-state workspace runtime builtins (clear / who / whos / clearvars) registered alongside these via runtime::registerWorkspaceRuntime; those live in-process, these read/write files. Both touch the VM's variable environment, so the public C++ API takes Engine& (for VFS) and Environment& (for var lookup / assignment).
load's no-LHS branch writes into Environment using a stem-derived var name; the (nargout, outs) pair lets the same entry point serve both forms.
Definition in file saveload.hpp.