cct/fluxus is the canonical dynamic-vector module delivered in FASE 11D.3.
Import:
ADVOCARE "cct/fluxus.cct"
fluxus_init(...)allocates a vector instance.fluxus_free(...)must be called exactly once by the caller.fluxus_clear(...)resets length but keeps allocated capacity.
fluxus_init(REX elem_size) -> SPECULUM NIHILfluxus_free(SPECULUM NIHIL flux) -> NIHILfluxus_push(SPECULUM NIHIL flux, SPECULUM NIHIL elem) -> NIHILfluxus_pop(SPECULUM NIHIL flux, SPECULUM NIHIL out) -> NIHILfluxus_len(SPECULUM NIHIL flux) -> REXfluxus_get(SPECULUM NIHIL flux, REX idx) -> SPECULUM NIHILfluxus_clear(SPECULUM NIHIL flux) -> NIHILfluxus_reserve(SPECULUM NIHIL flux, REX cap) -> NIHILfluxus_capacity(SPECULUM NIHIL flux) -> REX
ADVOCARE "cct/fluxus.cct"
RITUALE main() REDDE REX
EVOCA SPECULUM NIHIL flux
EVOCA REX x AD 42
VINCIRE flux AD CONIURA fluxus_init(MENSURA(REX))
CONIURA fluxus_push(flux, SPECULUM x)
EVOCA SPECULUM REX p
VINCIRE p AD CONIURA fluxus_get(flux, 0)
EVOCA REX out AD *p
CONIURA fluxus_free(flux)
REDDE out
EXPLICIT RITUALE
Runtime failure is explicit for invalid operations:
fluxus_initwith non-positiveelem_sizefluxus_popon empty vectorfluxus_getout of bounds- null vector pointer in API calls
- Growth strategy is deterministic (
2x, starting from capacity8). - This subset is intentionally minimal and does not include insert/remove/sort.
- For practical usage see
examples/fluxus_demo.cct.