HP Forums
INPUT & EVAL() - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: INPUT & EVAL() (/thread-11114.html)



INPUT & EVAL() - Tyann - 07-24-2018 10:37 AM

Bonjour

j'ai fait quelques essais avec INPUT et EVAL() mais je n'obtiens que des messages
d'erreur.
Quelqu'un aurait-il fait des essais concluants ?


Hello

I did some tests with INPUT and EVAL() but I only get messages
error.
Has anyone done any conclusive tests?


RE: INPUT & EVAL() - DrD - 07-24-2018 10:56 AM

I have tried this:

Code:

EXPORT test()
BEGIN  

  LOCAL d2ydx2, x, y, t;

  INPUT({ {x, [8], {35,60,0}},                 
          {y, [8], {35,60,1}},
          {t, [8], {35,60,2}} },
                       
          "Parametric Equation 2nd Derivative", 
          {"x = ", "y = ", "Parameter = "}, 
          {"Enter the x-function ", "Enter the y-function", "Enter the parameter variable"},           
          {QUOTE(t^2-4),QUOTE(t^3-3*t),QUOTE(t)}, 
          {QUOTE(t^2-4),QUOTE(t^3-3*t),QUOTE(t)} );

  d2ydx2:=normal(diff((diff(y,t))/(diff(x,t)),t)/(diff(x,t))); //  Second derivative 
  RETURN d2ydx2; 

END;

The default {reset,initial} parameters work, however, manually inputting new, (or changing existing) values, doesn't work. There are probably better ways to do this, but this is where I am at the moment...

-Dale-


RE: INPUT & EVAL() - Carlos295pz - 07-24-2018 04:24 PM

Code:
EXPORT INPEVAL
BEGIN

 LOCAL Vars={{'X',[0],{30,20,1}},
             {'Y',[0],{30,20,2}},
             {'Z',{10,20,30},{30,20,3}}};

 INPUT(EVAL(Vars));
 INPUT(EVAL(Vars({1,2})));
 INPUT(EVAL(Vars({2,3})));

 Vars(0):={'W',[0],{30,20,1}};

 INPUT(EVAL(Vars({2,4})));

 INPUT(EVAL(CONCAT({Vars(0)},Vars({2,3}))));

 LOCAL VHelp:={"▇▶Help for X◀▇",
               "▇▶Help for Y◀▇",
               "▇▶Help for Z◀▇"};
 LOCAL VSelect:={2,3};

 INPUT(EVAL(Vars(VSelect)),{},{},VHelp(VSelect));

END;



RE: INPUT & EVAL() - Tyann - 07-24-2018 04:36 PM

DrD
Désolé j'ai été un peu laconique, message posté juste avant de partir au travail,
mais je voulais parler des nouvelles possibilités offertes par la mise à jour.

Sorry I was a bit laconic, message posted just before going to work,
but I wanted to talk about the new possibilities offered by the update.

Carlos295pz
Super, c'est exactement ce que j'essayais de faire, merci beaucoup.
Excellente cette nouvelle possibilité.

Great, that's exactly what I was trying to do, thank you very much.
Excellent this new possibility.