Question: procedure: mixed output with text and variables, use variables after proc has processed

Hello,
I tried to write a procedure for the first time and it worked good. But I still have problems:

1. the coordinates of the point "p"
Is it possible to mix text with variables like: "The balance point is: xs:",xs,"/ys:",ys
                        or "The balance point is [xs,ys]=",p

2. use of "y" after procedure has processed
I declared the variables of the function as global but I can't calculate with them after the procedure has finished, like: "y(2)=4"
When I type "y(2)" it is displayed: "x2"


----------------------------
Here is my code:
----------------------------

restart:
with(plots):

> flsp:= proc(f,ug,og) global y,intXdA,intYdA,intdA,xs,ys,p,a,b,c;
  y:=unapply(f):
  intXdA:=evalf(int(x*y(x),x=ug..og));
  intYdA:=evalf(int(1/2*y(x)*y(x),x=ug..og));
  intdA:=evalf(int(y(x),x=ug..og));
  xs:=evalf(intXdA/intdA);
  ys:=evalf(intYdA/intdA);
  p:=[xs,ys];
  print(p);
  a:=plot(y(x),x=ug..og,color=blue,filled=true):
  b:=pointplot(p,symbol=cross,symbolsize=50,color=green):
  c:=display({a,b});
  print(c);    
  end:
> flsp(x^2,0,10);

Thanks for your help!

Greetings flash20001

Please Wait...