Expand description
Edited PIC (numeric editing) decode and encode support. Edited PIC (Phase E2 + E3) decode and encode support
This module implements decode and encode for edited numeric PICTURE clauses following IBM COBOL specifications. Edited PICs include formatting symbols like Z (zero suppression), $ (currency), comma, decimal point, B (blank space insertion), and sign editing (+, -, CR, DB).
The decode algorithm walks the input string and PIC pattern in lockstep, extracting numeric digits and validating formatting symbols. The encode algorithm formats numeric values according to the pattern.
Structs§
- Numeric
Value - Decoded numeric value extracted from an edited PIC field.
Enums§
- PicToken
- Pattern tokens for edited PIC clauses.
- Sign
- Sign extracted from an edited PIC field during decode.
Functions§
- decode_
edited_ numeric - Decode edited numeric string according to PICTURE pattern
- encode_
edited_ numeric - Encode a numeric value to an edited PIC string
- tokenize_
edited_ pic - Tokenize an edited PIC pattern into tokens