ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


multiple_return_values

This is an old revision of the document!


Multiple return values convention

Some ACSUtils functions return multiple values (e.g. [[math|vector math functions). ACS doesn't support returning multiple values from a function.

ACSUtils uses a convention to fake returning multiple values from a function. The convention is as follows: there are 8 global variables with names r1 through r8. If a function returns multiple values, it actually returns no value and writes the first “returned” value to r1, the second one to r2, and so on.

multiple_return_values.1555697525.txt.gz · Last modified: 2019/04/19 21:12 by korshun