Kryptostack
|
Implementation of miscellaneous definitionen und functions. More...
#include <iostream>
#include <string>
#include <map>
#include <charconv>
#include <quadmath.h>
#include "so.h"
#include "helper.h"
#include "context.h"
#include "interpreter.h"
Functions | |
std::string | to_string (__int128 p_z) |
We need a dedicated function, because __int128 isn't supported by to_string(). More... | |
std::string | to_string (__float128 r_) |
We need a dedicated function, because __float128 isn't supported by to_string(). More... | |
__int128 | stoint128 (const std::string &p_s) |
We need a dedicated function, because __float128 isn't supported by the standard library. More... | |
__float128 | stofloat128 (const std::string &p_s) |
We need a dedicated function, because __float128 isn't supported by the standard library. More... | |
void | opErrExit (const OpError p_err, const std::string &p_details) |
Operator Error Message to cout and exit(1). | |
void | inErrExit (InError p_err, const std::string &p_details) |
Interpreter Error Message to cout and exit(1). | |
std::string | strescape (const std::string &p_s) |
Substitutes double backslashes by single backslashes and sequences backslash + 'n' by the ASCII CR code. | |
void | statistics () |
Dumps statistics data. More... | |
void | snap () |
Snapshot of system state to cout. | |
Implementation of miscellaneous definitionen und functions.
void statistics | ( | ) |
Dumps statistics data.
Dumps it only if there are open memory allocations.
__float128 stofloat128 | ( | const std::string & | p_s | ) |
We need a dedicated function, because __float128 isn't supported by the standard library.
Implemented with GNU quadmath.
__int128 stoint128 | ( | const std::string & | p_s | ) |
We need a dedicated function, because __float128 isn't supported by the standard library.
Has no syntax check. A leading '+' is not allowed. No overflow check
std::string to_string | ( | __float128 | r_ | ) |
We need a dedicated function, because __float128 isn't supported by to_string().
Implementation with GNU quadmath
std::string to_string | ( | __int128 | p_z | ) |
We need a dedicated function, because __int128 isn't supported by to_string().
[in] | p_z | we need a representation for this number |