Some functions return several values. For instance, XGCD(a, b) returns three values. To assign all three values to identifiers, use a multiple assignment statement:
> d, m, n := XGCD(134, 23);
The identifiers on the left of the assignment statement must be separated by commas.
If you do not want all three values then you can reject some of them with the special throwaway identifier, which is the underscore character (_). For example, to assign only the third value, type:
> _, _, n := XGCD(134, 23);
If the values you do not want are the last ones then you can omit their identifiers entirely:
> d, m := XGCD(134, 23);
> q, r := Quotrem(5001, 57);> q := Quotrem(5001, 57);
> _, r := Quotrem(5001, 57);
[Next] [Prev] [Right] [Left] [Up] [Index] [Root]