t3x.org / t3x / t3x-manual / 355.html
 
T3X - A Minimum Procedural Language
Version 8.1.5, Online Edition
Copyright(C) 1996-2004
Nils M Holm
 
Previous:
3.5.4 INIT
TOC | Index | Back Next:
3.6 STRING -- String Functions

3.5.5 WALK

mem.WALK(vec, sizep, statp) ! Vec,Vec,Vec => Vec

Traverse the list of vectors of 'mem'. This list contains both allocated and free vectors. Traversing the list works as follows: When WALK is called for the first time, 'vec' must be zero:

v := mem.walk(0, @p, @s);

This call will return a pointer to the first vector of 'mem'. The returned vector can be passed to WALK in a subsequent call to retrieve a pointer to the next vector:

v := mem.walk(v, @p, @s);

When the 'vec' argument finally points to the last vector in 'mem', WALK will return zero, thereby indicating the end of the list.

The 'sizep' argument is a one-word vector which will be filled with the size of the returned vector. 'Statp' is a one-word vector which will be filled with the status of the vector (1=free, 0=allocated). If either 'statp' or 'sizep' is zero, it will be ignored by WALK.

Previous:
3.5.4 INIT
TOC | Index | Back Next:
3.6 STRING -- String Functions