Almost any command in Singular needs to be called with (may be empty) parentheses.
The
return command is not exception from this rule. So put the ( ), and it works as desired.
Code:
> proc test123() {
return(v(1)*v(2));
}
> ring A = 0,(v(1..2)),dp;
> test123();
v(1)*v(2)
Hint: To make this proc independent of the names of the variables, write:
Code:
> proc test1234() {
return(var(1)*var(2));
}
> ring rdp = 0,(x,y),dp;
> test1234();
xy
Almost any command in Singular needs to be called with (may be empty) parentheses.
The [i]return [/i] command is not exception from this rule. So put the ( ), and it works as desired.
[code]
> proc test123() {
return(v(1)*v(2));
}
> ring A = 0,(v(1..2)),dp;
> test123();
v(1)*v(2)
[/code]
Hint: To make this proc independent of the names of the variables, write:
[code]
> proc test1234() {
return(var(1)*var(2));
}
> ring rdp = 0,(x,y),dp;
> test1234();
xy
[/code]