// "cfa -c -o array.o array.c" // "cfa -CFA array.c > array_out.c" // "gcc32 array_out.c ../LibCfa/libcfa.a" #include "array.h" /// forall( type array_type, elt_type | bounded_array( array_type, elt_type ) ) /// [ array_iterator begin, array_iterator end ] /// get_iterators( array_type array ) /// { /// begin = 0; /// end = last( array ); /// } // The first element is always at index 0. forall( type array_type, type elt_type | bounded_array( array_type, elt_type ) ) elt_type * begin( array_type array ) { return &array[ 0 ]; } // The end iterator should point one past the last element. forall( type array_type, type elt_type | bounded_array( array_type, elt_type ) ) elt_type * end( array_type array ) { return &array[ last( array ) ] + 1; }