Next: , Previous: , Up: The Double Ended Queue Library   [Index]


13.6.8 Decq Statements

The ‘decq’ ‘for’ statements are:

See The For Statement.

type is one of the types for which an qf_js_ function is defined.

See Data Type Specific Decq Front Functions.

See Data Type Specific Decq Back Functions.

The first iteration variable is an integer set at the begining of the traversal with the double ended queue length, and decremented after each step. The second iteration variable is the double ended queue content.

The statements are conveniences for:

    if ((f = q_length(q) && q*_js_<type>(s, q)) {
	do {
	} while ((f -= 1) && q*_js_<type>(s, q));
    }

where f is the first iteration variable, s the second, q the double ended queue being traversed and the star one of the literals ‘f’ and ‘b’.

The ‘for’ traversal shifts the collection, with earlier exits seeing a shifted state.