E1127: realtime code uses floating point

View source

A verb marked meta realtime may not use floating-point literals, types or operations (ADR-0094).

A verb marked meta realtime may not use floating-point literals, types or operations (ADR-0094). The error points at the first use. Use integers, for example fixed-point values that you scale yourself.

Example

actus
meta realtime
verb scale() -> Int {
    erg ratio = 0.5;
    return 1;
}

verb main() {
}

Fix

Work in integers.

actus
meta realtime
verb scale() -> Int {
    erg half: Int = 1;
    return half * 2;
}

verb main() {
}

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