# as comentary (Xcas mode)

Messages in english

Modérateur : xcasadmin

compsystems
Messages : 518
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

# as comentary (Xcas mode)

Message par compsystems » mar. janv. 14, 2020 3:17 am

Hi

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

parisse
Messages : 5081
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: # as comentary (Xcas mode)

Message par parisse » mer. janv. 15, 2020 4:05 pm

Programs on the HP should be entered in the programming editor. Comments work.
For commandlines, I only control algebraic entry mode.

compsystems
Messages : 518
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

Re: # as comentary (Xcas mode)

Message par compsystems » mer. janv. 15, 2020 8:36 pm

ok, but if comments are supported with # (Xcas mode), the problem of interpretation in text book mode// and / * in hp-prime is fixed.

Répondre