| parrotcode: APLVector | |
| Contents | Language Implementations | APL |

src/pmc/APLVector.pmc - APLVector

These are the vtable functions for the APL Vector class.

if (!shape || shape == PMCNULL) {
/* not set, so a simple 1D */
return VTABLE_get_integer(interpreter, self);
}
retval = 1;
dimension = VTABLE_get_integer(interpreter, shape);
for (pos = 0; pos < dimension; pos++)
{
length = VTABLE_get_integer_keyed_int(interpreter, shape, pos);
retval *= length;
}
return retval;
}

void class_init()PMC *init()PMC *get_shape()PMC *set_shape()
|
|
|