-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathio.tbl
39 lines (37 loc) · 1.29 KB
/
io.tbl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// ****************************************************************************
// io.tbl ELFE project
// ****************************************************************************
//
// File Description:
//
// Implementation of basic text I/O
//
//
//
//
//
//
//
//
// ****************************************************************************
// (C) 2015 Christophe de Dinechin <[email protected]>
// (C) 2015 Taodyne SAS
// ****************************************************************************
PREFIX(WriteText, boolean, "write", text,
R_BOOL(std::cout << left.value));
PREFIX(WriteInteger, boolean, "write", integer,
R_BOOL(std::cout << left.value));
PREFIX(WriteReal, boolean, "write", real,
R_BOOL(std::cout << left.value));
PREFIX(WriteCharacter, boolean, "write", character,
R_BOOL(std::cout << left.value));
PREFIX(WriteTree, boolean, "write", value,
Tree *value = leftPtr;
if (Tree *eval = IsClosure(value, NULL))
value = eval;
R_BOOL(std::cout << value));
NAME_FN(WriteNewLine, boolean, "writeln",
R_BOOL(std::cout << "\n"));
PREFIX(DebugTree, boolean, "debug", value,
Tree *value = leftPtr;
R_BOOL(std::cout << value));