Input form in CAS programs
|
10-12-2016, 10:11 AM
Post: #1
|
|||
|
|||
Input form in CAS programs
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 |
|||
10-12-2016, 01:40 PM
Post: #2
|
|||
|
|||
RE: Input form in CAS programs
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.
|
|||
10-12-2016, 02:39 PM
Post: #3
|
|||
|
|||
RE: Input form in CAS programs
This works:
Code: export blinput() It's not pretty, but it works. -road |
|||
10-12-2016, 03:00 PM
Post: #4
|
|||
|
|||
RE: Input form in CAS programs
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 |
|||
10-12-2016, 03:30 PM
(This post was last modified: 11-03-2016 01:06 AM by compsystems.)
Post: #5
|
|||
|
|||
RE: Input form in CAS programs
The solution is to create again the input functions (HOME PRG) =(
the CAS should support DIALOG BOXES COMMANDS. PHP Code: #cas |
|||
10-12-2016, 06:50 PM
Post: #6
|
|||
|
|||
RE: Input form in CAS programs
(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. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)