Maple蔡鸟求助
楼主 · 1 楼
我从Maple书上抄来的一个简单程序:
> restart;
> Ad1:=proc(a,b)
> local t;
> t:=a+b;
> end;
但我执行时出错!怎么回事呀?高手指点,谢谢
> restart;
> Ad1:=proc(a,b)
>
Warning, premature end of input
> local t;
Error, reserved word `local` unexpected
> t:=a+b;
t := a + b
> end;
Error, reserved word `end` unexpected
> Ad1(1,2);
Ad1(1, 2)
> restart;
> Ad1:=proc(a,b)
> local t;
> t:=a+b;
> end;
但我执行时出错!怎么回事呀?高手指点,谢谢
> restart;
> Ad1:=proc(a,b)
>
Warning, premature end of input
> local t;
Error, reserved word `local` unexpected
> t:=a+b;
t := a + b
> end;
Error, reserved word `end` unexpected
> Ad1(1,2);
Ad1(1, 2)
2 楼
输入函数时, 使用Shift+Enter, 不要使用Enter, 就可以了.
3 楼
Many thanks. I have studied