SAIF.Framework.BaseN operations and processes¶
This page is the operation catalog and cross-operation hub for this library. Each operation's detailed, step-by-step logic lives in its own page under operations/.
Operation catalog¶
| Operation | Intent | Trigger | Inputs | Outputs | Rules | Tables | SQL |
|---|---|---|---|---|---|---|---|
| Decode BaseN string to decimal | Reads a BaseN character sequence and resolves it to its decimal value. | Caller invokes BaseNToDecimal on a string. |
Source string, IConverter |
Decimal Long |
BR-001, BR-002, BR-004 | — | — |
| Encode decimal to BaseN string | Renders a decimal value as a BaseN string in the caller's chosen base. | Caller invokes DecimalToBaseN on an Integer or Long. |
Decimal Integer or Long, IConverter |
BaseN string | BR-001, BR-002, BR-003 | — | — |
| Format digit array as BaseN string | Assembles a digit array into the converter's final string output, applying Excel-specific rollover where needed. | Encode flow or direct IConverter.FormatBaseN call. |
Integer digit array | Formatted BaseN string | BR-001, BR-002, BR-003 | — | — |
| Convert alpha digit to numeric value | Resolves a single character token to the numeric digit value the active converter expects. | Decode flow, encode re-tokenization, or direct IConverter call. |
Single-character string token | Integer digit value | BR-001, BR-002, BR-004 | — | — |
| Convert numeric digit to alpha representation | Resolves one numeric digit to the string token the active converter renders. | Encode recursion, formatting flow, or direct IConverter call. |
Integer digit value | String token | BR-001, BR-002, BR-003 | — | — |
Process flow diagram¶
The following diagram visualizes the primary operational flow across operations, showing how decoding and encoding each delegate to the shared digit-conversion operations.
flowchart TD
Start([Caller requests conversion]) --> Decision{Decode or encode?}
Decision -->|Decode| Decode[Decode BaseN string to decimal]
Decode --> Alpha[Convert alpha digit to numeric value]
Alpha --> Sum[Accumulate positional decimal value]
Sum --> EndDecode([Return decimal result])
Decision -->|Encode| Encode[Encode decimal to BaseN string]
Encode --> Numeric[Convert numeric digit to alpha representation]
Numeric --> Format[Format digit array as BaseN string]
Format --> EndEncode([Return BaseN string])
Failure and edge-case behavior¶
BaseNToDecimalconsumes the input string one character at a time and never strips delimiters or groups multi-character segments first, so any pre-formatted or delimited BaseN string must be normalized by the caller before decoding.ConverterBase.ConvertAlphaToNumericsilently returns0for non-numeric input rather than failing. BecauseBinaryConverterandOctalConverterinherit this default without overriding it, they treat invalid characters as zero-valued digits instead of rejecting them (BR-004).HexConverterraisesConverterExceptionfor any alphabetic character outsideA-For any numeric value greater than16, so malformed hex input fails fast rather than producing a partial result (BR-001).ExcelConverterraisesConverterExceptionwhen a mapped character or numeric digit exceeds26. Where a digit does resolve successfully, its formatter still rewrites any0digit through borrow/rollover logic before the string is emitted, preserving the bijective A-Z, AA-style output (BR-002, BR-003).
Related documentation¶
Sources¶
SAIF.Framework.BaseN\BaseNConverter.vbSAIF.Framework.BaseN\ConverterBase.vbSAIF.Framework.BaseN\BinaryConverter.vbSAIF.Framework.BaseN\OctalConverter.vbSAIF.Framework.BaseN\HexConverter.vbSAIF.Framework.BaseN\ExcelConverter.vbSAIF.Framework.BaseN\IConverter.vbSAIF.Framework.BaseN\ConverterException.vb