List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] My first program with MAPLE
| [MUG] My first program with MAPLE |
|
Author: Marcel Alain
Posted: Thu, 08 Aug 2002 19:29:05 -0400
|
>> From: Marcel Alain "malain"
Hello
I am writing my firts Maple program. I want to obtain the sum, the
difference, the product and the quotient of two nombers or expressions a
and b. I coded the following instructions. But, the program gives only
the result of the last operation (here, the quotient : 3/5). I tried
with one, two, three or four operations. What is the problem ?
Thanks
Marcel
OPER:=proc(a,b)
> Somme:=a+b;print(`Somme =`);Somme;
> Differ:=a-b;print(`Differ =`);Differ;
> Produit:=a*b;print(`Produit =`);Produit;
> Quotient:=a/b;print(`Quotient =`);Quotient;
> end:
> OPER(3*x,5*x);
Warning, `Somme` is implicitly declared local
Warning, `Differ` is implicitly declared local
Warning, `Produit` is implicitly declared local
Warning, `Quotient` is implicitly declared local
Somme =
Differ =
Produit =
Quotient =
3/5
|
Previous by date: [MUG] Maple problem (?), Paul E S Wormer
Next by date: [MUG] AW: Creating combinations of normal 3D surfdata and contours, Thomas Richard
Previous thread: [MUG] Options Menu in Maple 7, Carl Eberhart
Next thread: [MUG] Creating combinations of normal 3D surfdata and contours, Jens Ernst
|