E1139: print of an integer wider than 64 bits

View source

print(int: value) and eprint(int: value) write integers of up to 64 bits.

print(int: value) and eprint(int: value) write integers of up to 64 bits. A wider value, such as u128, is rejected with this error (ADR-0084). The same holds for an int: argument of a format: print. The message names the type. Cast the value to a 64-bit type first.

Example

actus
verb main() {
    erg wide: u128 = 5u128;
    print(int: wide);
}

Fix

Cast to a 64-bit type. The cast traps when the value does not fit.

actus
verb main() {
    erg wide: u128 = 5u128;
    println(int: wide as u64);
}

Run actus explain E1139 in your terminal to read this entry offline. Browse Modules & rules or all error codes.