nk
1.0.0
C++ Numerical Computing Runtime
Toggle main menu visibility
Loading...
Searching...
No Matches
runtime/include/nk/runtime/io.hpp
Go to the documentation of this file.
1
3
// src/runtime/include/nk/runtime/io.hpp
4
//
5
// Language-runtime I/O functions coupled to the Engine execution context
6
// (outputText sink, fid table, OpenFile).
7
#pragma once
8
9
#include <cstddef>
10
#include <nk/value/value.hpp>
11
#include <nk/value/span.hpp>
12
13
namespace
nk {
14
17
18
class
Engine
;
19
}
20
21
namespace
nk::runtime {
22
27
std::size_t
fprintf
(
::nk::Engine
&engine,
Span<const Value>
args);
28
32
void
disp
(
::nk::Engine
&engine,
Span<const Value>
args);
33
39
void
fscanf
(
::nk::Engine
&engine,
Span<const Value>
args,
size_t
nargout,
Span<Value>
outs);
40
46
void
textscan
(
::nk::Engine
&engine,
Span<const Value>
args,
size_t
nargout,
Span<Value>
outs);
47
48
50
}
// namespace nk::runtime
nk::Engine
Definition
engine.hpp:32
nk::Span
Definition
span.hpp:11
nk::runtime::fscanf
void fscanf(::nk::Engine &engine, Span< const Value > args, size_t nargout, Span< Value > outs)
Reads formatted data from file descriptor (fscanf(fid, fmt, size)).
nk::runtime::fprintf
std::size_t fprintf(::nk::Engine &engine, Span< const Value > args)
Formats and writes text to engine stdout or open file descriptor.
nk::runtime::textscan
void textscan(::nk::Engine &engine, Span< const Value > args, size_t nargout, Span< Value > outs)
Reads tabular data from open file descriptor or string (textscan(fid, fmt)).
nk::runtime::disp
void disp(::nk::Engine &engine, Span< const Value > args)
Displays value to engine standard output (disp(v)).
src
runtime
include
nk
runtime
io.hpp
Generated by
1.17.0