Numbers

Syntax

1*DIGIT ["K" / "M" / "G"]

Description

Numbers are given as ordinary positive decimal numbers. However, those numbers that have a tendency to be fairly large, such as message sizes, may have a "K", "M", or "G" appended to indicate a multiple of a power of two. To be comparable with the power-of-two-based versions of SI units that computers frequently use, K specifies kibi-, or 1,024 (2^10) times the value of the number; M specifies mebi-, or 1,048,576 (2^20) times the value of the number; and G specifies tebi-, or 1,073,741,824 (2^30) times the value of the number.

Only positive integers are permitted.

The magnitude in numbers is Implementor specific. But it is guaranteed to be at least 31 bits.

Example

if size :over 100K {
   discard;
}

Module

Core : Requires no import statement

Resources

RFC3028