ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


multiple_return_values

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
multiple_return_values [2019/04/19 22:37] korshunmultiple_return_values [2019/04/22 00:32] (current) korshun
Line 1: Line 1:
-====== Multiple return values convention ======+====== Multiple return values ======
  
 Some ACSUtils functions return multiple values (e.g. [[math#vector_math|vector math functions]], but also some non-math functions). ACS doesn't support returning multiple values from a function. Some ACSUtils functions return multiple values (e.g. [[math#vector_math|vector math functions]], but also some non-math functions). ACS doesn't support returning multiple values from a function.
Line 31: Line 31:
 SomeOtherFunction(a); SomeOtherFunction(a);
 </code> </code>
 +</note>
 +
 +<note important>Another shortcoming is that ''r1''..''r8'' are declared ''raw'' in BCC to be able to accomodate any type of return value, and thus bypass [[strict typing]], even if it's enabled.
 +
 +<code>
 +ParseFixed("1.0", 10);
 +int error = r1;
 +int result = r2; // no compiler error, despite assigning a fixed to int
 +</code>
 +
 </note> </note>
  
multiple_return_values.1555702677.txt.gz · Last modified: 2019/04/19 22:37 by korshun