Question: Error line indication?

Is there a way for Maple to tell where the error occurs? For example I am not able to find the error that says 'Error, missing operator or `;'' in the following code.

 

# ctrl + del to delete a Maple cell
# golden search implementation
# chapra 7th ed
golden_search := proc(f, xl, xu, es100, maxiter)
description "find the optimal point using golden-search optimization method";
locals R, d, xopt, x1, x2, f1, f2, iter, ea, xint;
R := (sqrt(5)-1)/2;
d := R*(xu-xl);
x1 := xl + d;
x2 := xu - d;
f1 := evalf(eval(f, x = x1));
f2 := evalf(eval(f, x = x2));
# declare iterator and ea
iter := 1;
ea := 1.00;
# start while
while ea*100 > es100 and iter < maxiter do
    d := R*d; # new golden ratio
    xint := xu - xl;
    if f1 > f2 then
        xopt := x1;
        fx := f1;
        x1 := x2;
        x2 := x1;
        x1 := x1 + d;
        f2 := f1;
        f1 := evalf(eval(f, x = x1));
    else
        xopt := x2;
        fx := f2;
        xu := x1;
        x1 := x2;
        x2 := xu - d;
        f1 := f2;
        f2 := evalf(eval(f, x = x2));
    end if
    # calculate new ea
    if xopt <> 0 then
        ea := (1 - R)* abs(xint/xopt);
    end if
    iter = iter + 1;
end do;
# return xopt and fx here
xopt;
end proc:
 
Please Wait...