parrotcode: APLVector | |
Contents | Language Implementations | APL |
src/pmc/APLVector.pmc - APLVector
These are the vtable functions for the APL Vector class.
if (!shape || PMC_IS_NULL(shape)) {
/* not set, so a simple 1D */
return VTABLE_get_integer(interp, self);
}
retval = 1;
dimension = VTABLE_get_integer(interp, shape);
for (pos = 0; pos < dimension; pos++)
{
length = VTABLE_get_integer_keyed_int(interp, shape, pos);
retval *= length;
}
return retval;
}
void class_init()
PMC *init()
PMC *get_shape()
PMC *set_shape()
|