This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
mulretval [2016/04/25 00:32] – korshun | mulretval [2017/07/13 18:29] – korshun | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Multiple return values ====== | + | #REDIRECT a_GetCVarFixed |
- | + | ||
- | 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 | + | |
- | + | ||
- | <note warning> | + |