Next: Low-level Pre-Scheme memory manipulation, Previous: Pre-Scheme record types, Up: More Pre-Scheme packages
Pre-Scheme support multiple return values, like in Scheme. The only
difference is that one cannot operate on multiple return values as
lists, since Pre-Scheme does not have lists. Multiple return values
are implemented in C as returning in C the first value and passing
pointers to the remaining values, which the function returning multiple
values assigns. The prescheme
structure exports the two
multiple return value primitives, call-with-values
and
values
, but the ps-receive
structure exports this macro
for more conveniently binding multiple return values.