Hi, I made a program which put the x and y coordonates when a condition is verified but I have an error generated in SAS, here some informations : %macro mandelbrot(x_min,x_max,y_min,y_max,pas,seuil,n_max);
%let pas_coef=&pas.*100;
%let x_min_coef=(&x_min.*100);
%let x_max_coef=(&x_max.*100);
%let y_min_coef=(&y_min.*100);
%let y_max_coef=(&y_max.*100);
%let u=0;
%let v=0;
%do i=&x_min_coef. %to &x_max_coef. by &pas_coef.;
%do j=&y_min_coef. %to &y_max_coef. by &pas_coef.;
%let n=0;
%let u=0;
%let v=0;
%let &norm=0;
%let x_r=%sysevalf(&i./100);
%let y_r=%sysevalf(&j./100);
%do %while(&norm.<&seuil. and &n.<&nmax.);
%let n=%eval(1+&n.);
%let u=%sysevalf((&u.)**2-(&v.)**2+&x_r.);
%let v=%sysevalf(2*(&u.)*(&v.)+&y_r.);
%let &norm=%module_2(&u.,&v.);
%end;
%if (&norm.<&seuil.) %then %do;
proc sql;
insert into MANDELBROT values (&x_r.,&y_r.);
quit;
%end;
%end;
%end;
%mend mandelbrot;
%mandelbrot(-2,0.5,-1.1,1.1,0.02,2,30); The error : ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: &x_max_coef. by &pas_coef. ERROR: The %TO value of the %DO I loop is invalid. ERROR: The macro MANDELBROT will stop executing.
... View more