IntToU64WithError
Description
Convert an integer to u64.
Parameters
| Name | Direction | Description |
|---|---|---|
value |
in | Integer to convert |
error |
out | Optional pointer set to true on failure and false on success |
Success
Returns The numeric value as u64, or 0 on failure.
Failure
Returns 0 when the value exceeds 64 bits. *error (if non-NULL) is set to true.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Convert.h:530:
static inline u64 int_to_u64_no_error(const Int *value) {
return IntToU64WithError(value, NULL);
}- In
Convert.h:558:
/// TAGS: Int, Convert, U64, Macro
///
#define IntToU64(...) INT_TO_U64_SELECT(__VA_ARGS__, IntToU64WithError, int_to_u64_no_error)(__VA_ARGS__)
///
- In
Int.c:500:
}
u64 IntToU64WithError(const Int *value, bool *error) {
u64 out = 0;
bool ok = IntTryToU64(value, &out);
Last updated on