Post Reply 
Newton's Method
09-11-2023, 11:29 PM (This post was last modified: 09-11-2023 11:31 PM by Gene222.)
Post: #10
RE: Newton's Method
Regarding Style 2 INPUT example in the first post, the use of the INPUT command will not allow an expression to be inputted. The solution is discussed by Han on a different forum, which states:

"Han
01-17-2017, 04:14 PM
INPUT() has gone through a number of changes since that post. There are two ways to get around the issue you have:

1) Initialize your f and f1 to objects of the type you wish to use in the INPUT() command. When you do not initialize them, then they are set to the value 0 by default (type: real number). Thus, when a user then enters something that is not a real number, the INPUT() command complains of invalid input. You can, for example, set f:='X^2-5' and f1:='2*X' before the INPUT() command, and then it will expect an algebraic expression.

2) The other method use the more advanced form of INPUT() to enforce the input type for each field (i.e. f and f1 and be required to expect an expression). The help screen for INPUT() explains everything you need to make use of the advanced form."
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Newton's Method - Han - 01-17-2014, 09:45 PM
RE: Newton's Method - FrankiD - 03-29-2014, 06:29 PM
RE: Newton's Method - Han - 03-30-2014, 01:47 AM
RE: Newton's Method - FrankiD - 03-30-2014, 02:45 AM
RE: Newton's Method - Han - 03-30-2014, 02:08 PM
RE: Newton's Method - FrankiD - 03-30-2014, 06:25 PM
RE: Newton's Method - Han - 04-07-2014, 07:47 PM
RE: Newton's Method - Snorre - 01-10-2015, 09:52 PM
RE: Newton's Method - Han - 01-10-2015, 11:01 PM
RE: Newton's Method - Gene222 - 09-11-2023 11:29 PM



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