HP Forums

Full Version: INPUT & EVAL()
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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-
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;
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.
Reference URL's