The hpprime entry line does not interpret the comments, that is, the symbols // assumes them as double division ÷÷
and /*, */ as ÷*
(see discussion in https://www.hpmuseum.org/forum/thread-14355.html).
Is it possible that XCAS codes interpret a comment // with the symbol # ?
this way you can define functions with comments in the hpprime, thank you very much
Code : Tout sélectionner
function fract(X_,Y_,Nmax) # Mandelbrot fractal, not using symmetry.
local x,y,z,c,j,w,h,res1,res2;
w:=2.7/X_;
h:=-1.87/Y_;
res1:=[];
Y_:=Y_-1;
for y from 0 to Y_ do
c:=-2.1+i*(h*y+0.935);
for x from 0 to X_-1 do
z:=0;
for j from 0 to Nmax-1 do
if abs(z:=z^2+c)>2 then break; fi;
od;
res1.append(pixon(x,y,126*j+2079));
c:=c+w;
od;
od;
return res1;
ffunction