![]() |
Input form in CAS programs - 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 form in CAS programs (/thread-7021.html) |
Input form in CAS programs - Tonig00 - 10-12-2016 10:11 AM When I introduce a simple program like: #cas PPP2():= BEGIN LOCAL a; INPUT(a); PRINT(a): return 0; END; #end It gives me an error: "Error: Invalid input" This simple program works in NON CAS program, so why does not work in CAS? Thanks in advance to anyone who answers me RE: Input form in CAS programs - parisse - 10-12-2016 01:40 PM It seems to be a problem with the INPUT command in CAS, not in the program itself. I would recommend to avoid programs with inputs in the CAS anyway, it's far better to write functions with arguments and return a result. RE: Input form in CAS programs - roadrunner - 10-12-2016 02:39 PM This works: Code: export blinput() It's not pretty, but it works. -road RE: Input form in CAS programs - Tonig00 - 10-12-2016 03:00 PM Thanks very much to all: Parisse: If I understood it may be better to write a program in NON CAS mode and prepare functions when needed in CAS and pass the parameters. I will try. roadrunner: Good solution, it works. I try this way too and chose the easiest for the problems. Thanks very much to all. Very helpful Toni RE: Input form in CAS programs - compsystems - 10-12-2016 03:30 PM The solution is to create again the input functions (HOME PRG) =( the CAS should support DIALOG BOXES COMMANDS. PHP Code: #cas RE: Input form in CAS programs - parisse - 10-12-2016 06:50 PM (10-12-2016 03:00 PM)Tonig00 Wrote: Parisse: If I understood it may be better to write a program in NON CAS mode and prepare functions when needed in CAS and pass the parameters. I will try. Yes, you should write CAS functions that do not require any interactive input from the user. User input should be passed as arguments to the function from the commandline. And from my experience, if you need the CAS, then it's easier to call the function directly from the CAS commandline than to write a specific UI. |