Post Reply 
using diff() in a program
05-09-2016, 05:16 AM
Post: #10
RE: using diff() in a program
Hello

>in that case, I saw that I must use a very strange INPUT syntax {{var,[2]}} in someone else post.

INPUT is a home command, and in home, you can not use a variable that has not been defined.
so, INPUT is (normally) unable to let you enter an equation in 'x' if 'x' does not exits.
INPUT takes as first argument a variable and let you request it from the user.
but INPUT can also take 2 or more variables, using {var1,.. varn} syntax.
Furthermore, you can tell INPUT that the variable requested have to follow a given type or types. This is done by placing the variable in a list and having the allowed types as a matrix in the 2nd element of the list.
It is only to make it easier for the system to distinguish between the use of the 3 syntaxes that you are forced, if you want to specify the type for one single variable to still create a list of list...

anyhow, here the 2 means string. So it forces the input to be a string. and strings, contrary to expression can contain anything you want, including the text of undefined variables.

This is why you use {{var [2]}}

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
using diff() in a program - hpfx - 05-08-2016, 09:18 AM
RE: using diff() in a program - roadrunner - 05-08-2016, 11:15 AM
RE: using diff() in a program - jrozsas - 05-08-2016, 01:13 PM
RE: using diff() in a program - roadrunner - 05-08-2016, 11:56 PM
RE: using diff() in a program - jrozsas - 05-09-2016, 12:52 PM
RE: using diff() in a program - informach - 05-08-2016, 02:13 PM
RE: using diff() in a program - DrD - 05-08-2016, 03:03 PM
RE: using diff() in a program - hpfx - 05-08-2016, 08:47 PM
RE: using diff() in a program - DrD - 05-08-2016, 09:46 PM
RE: using diff() in a program - informach - 05-09-2016, 12:14 AM
RE: using diff() in a program - cyrille de brébisson - 05-09-2016 05:16 AM
RE: using diff() in a program - roadrunner - 05-09-2016, 01:05 PM
RE: using diff() in a program - leprechaun - 05-10-2016, 09:56 AM



User(s) browsing this thread: 1 Guest(s)