Initializing help system before first use

# getstatus

Purpose
Get the status of an iterator.
Synopsis
`function getstatus(it:iterator):integer`
Argument

it | An iterator

Return value
Status of the iterator:

ITER_FREE | Not bound to any array (initial state)
ITER_BOUND | Bound to an array but enumeration has not yet started
ITER_READY | The iterator contains a valid reference
ITER_DONE | Enumeration has finished

Example

    declarations
      it: iterator
      A: hashmap array(range,string) of real
    end-declarations
    A(2,'a'):= 0.5; A(3,'b'):= 1.25
    writeln(it.status=ITER_FREE)              ! true
    inititer(it,A)
    writeln(it.status=ITER_BOUND)             ! true
    while (nextcell(it)) do
      writeln(it.status=ITER_READY)           ! true
      writeln('A(', it.indices, ')=', A(it))  ! A([2,'a'])=0.5  A([3,'b'])=1.25
    end-do
    writeln(it.status=ITER_DONE)              ! true
    reset(it)
    writeln(it.status=ITER_FREE)              ! true

Further information
An iterator can be used to dereference an array only when it is in the ITER_READY state.
Related topics
inititer, nextcell.
Module
mmreflect
Parent Topic mmreflect

© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.