Kryptostack
|
Miscellaneous definitions and functions. More...
#include <string>
Go to the source code of this file.
Macros | |
#define | public_accessor |
accessor functions | |
#define | public_virtual |
virtual member functions | |
#define | public_other |
other member functions | |
Typedefs | |
using | OTCode = char |
OTCode - the Object Type Code. More... | |
using | KSNCode = char |
KSNCode - the KryptoStack Normalized Code. More... | |
Enumerations | |
enum | OpError { invalidexit , rangecheck , stackunderflow , typecheck , unmatchedmark , dictstackunderflow , undefinedresult , undefined } |
Operator error code enum. | |
enum | InError { unknownoption , parsererror , helptext , quit , internal , other } |
Interpreter error code enum. | |
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) |
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 (const 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. | |
Miscellaneous definitions and functions.
using KSNCode = char |
KSNCode - the KryptoStack Normalized Code.
using OTCode = char |
OTCode - the Object Type Code.
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 |