mathsyntaxgap-system

How do you write a procedure call in GAP?


GAP differentiates a procedure call from a function: functions return a value whereas procedure calls produce an effect. Writing a function is fine, but what's the syntax for writing a procedure call in GAP?


Solution

  • I believe that the syntax is the same. You just have to omit the return statement, if there are no variables, that should be modified in the procedure. But if you have to return some values, I suggest that you should return them as list (i.e. [a, b,c,...]. ).