diff options
Diffstat (limited to 'manual')
| -rw-r--r-- | manual/manual.of | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/manual/manual.of b/manual/manual.of index 1069f644..c7f6904a 100644 --- a/manual/manual.of +++ b/manual/manual.of | |||
| @@ -3028,14 +3028,20 @@ When the function returns, | |||
| 3028 | all arguments and the function value are popped | 3028 | all arguments and the function value are popped |
| 3029 | and the call results are pushed onto the stack. | 3029 | and the call results are pushed onto the stack. |
| 3030 | The number of results is adjusted to @id{nresults}, | 3030 | The number of results is adjusted to @id{nresults}, |
| 3031 | unless @id{nresults} is @defid{LUA_MULTRET}. | 3031 | unless @id{nresults} is @defid{LUA_MULTRET}, |
| 3032 | In this case, all results from the function are pushed; | 3032 | which makes all results from the function to be pushed. |
| 3033 | In the first case, an explicit number of results, | ||
| 3034 | the caller must ensure that the stack has space for the | ||
| 3035 | returned values. | ||
| 3036 | In the second case, all results, | ||
| 3033 | Lua takes care that the returned values fit into the stack space, | 3037 | Lua takes care that the returned values fit into the stack space, |
| 3034 | but it does not ensure any extra space in the stack. | 3038 | but it does not ensure any extra space in the stack. |
| 3035 | The function results are pushed onto the stack in direct order | 3039 | The function results are pushed onto the stack in direct order |
| 3036 | (the first result is pushed first), | 3040 | (the first result is pushed first), |
| 3037 | so that after the call the last result is on the top of the stack. | 3041 | so that after the call the last result is on the top of the stack. |
| 3038 | 3042 | ||
| 3043 | The maximum value for @id{nresults} is 250. | ||
| 3044 | |||
| 3039 | Any error while calling and running the function is propagated upwards | 3045 | Any error while calling and running the function is propagated upwards |
| 3040 | (with a @id{longjmp}). | 3046 | (with a @id{longjmp}). |
| 3041 | 3047 | ||
