This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| mulretval [2016/04/24 21:25] – created korshun | mulretval [2019/04/18 18:47] (current) – removed korshun | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | acsutils uses a simple convention for functions returning multiple values, like RotateVector(): | ||
| - | There are global variables r1 through r8. The functions write their return values to them. | ||
| - | |||
| - | RotateVector(x, | ||
| - | int newX = r1; // Get the first returned value | ||
| - | int newY = r2; // And the second one | ||
| - | |||
| - | **Warning: you should retrieve the return values AS SOON AS POSSIBLE, or else they may get overwritten by other functions that return multiple values.** | ||