Post Reply 
Problem with negative numbers for INPUT function
02-16-2016, 07:19 PM
Post: #1
Problem with negative numbers for INPUT function

I have just registered so I apologize for not being familiar with your procedures. I purchased a wireless Prime directly from HP late December. Currently I am having a problem with a simple Mandelbrot program . I use INPUT to enter data including the x and y centres for the region of interest. I supply default values one of which is negative . If I run the program without editing the negative value , it runs as expected . if I enter any negative value ,including an exact copy of the negative default, then an Invalid Input error message is displayed. I will attach a copy of the program. I would be pleased to hear from anyone who can point out what is causing this behaviour. I should note that I have experienced difficulty obtaining documentation on the Prime,for example I have not found an example of using INPUT for multiple lines of data .

Thanks in advance

UncleJohn

[attachment=3130][attachment=3130][attachment=3130][attachment=3130][attachment=3130][attachment=3130]
Find all posts by this user
Quote this message in a reply
02-16-2016, 07:36 PM
Post: #2
RE: Problem with negative numbers for INPUT function
This is a bug with the Input command. When editing the input value, single quotes are placed around the new entry causing the error message. Entering the new negative value without quotes works correctly without any errors.
Find all posts by this user
Quote this message in a reply
02-16-2016, 09:05 PM
Post: #3
RE: Problem with negative numbers for INPUT function
(02-16-2016 07:19 PM)UncleJohn Wrote:  I have not found an example of using INPUT for multiple lines of data .
Have you checked the on calculator help text?

Code:

Syntax: INPUT(var,[“title”], [“label”], [“help”], [reset_value][initial_value]) INPUT({vars},[“titles”], [{“labels”}], [{“helps”}], [{reset_values}], [{initial_values}]) var -> {var_name, real, [{pos}]} var -> {var_name, [allowed_types_matrix], [{pos}]} var -> {var_name, {choose_items}, [{pos}]}

The simpler form of this command opens a dialog box with the given title and one field named label, displaying help at the bottom. The dialog box includes Cancel and OK menu keys. The user can enter a value in the labeled field. If the user presses the OK menu key, the variable var is updated with the entered value and 1 is returned. If the user presses the Cancel menu key, var is not updated and 0 is returned.

In the more complex form of the command, lists are used to create a multi- field dialog box. If var is a list, each element can be either a variable name or a list using the following format:

{var_name, real, [{pos}]} to create a checkbox control. If real is >1, then this checkbox gets pooled with the next n -1 checkboxes in a radio group (ie, only one of the n checkboxes can be checked at any time)

{var_name, [allowed_types_matrix], [{pos}]} to create an edit field. allowed_types_matrix lists all the allowed types ([-1] stands for all types allowed). If the only allowed type is a string, then the edition will hide the double quotes.

{var_name, {choose_items}, [{pos}]} to create a choose field.

If pos is specified, it is a list of the form { field start in screen percentage, field width in screen percentage, line (starts at 0) }. This allows you to control precisely the position and size of your fields. Note that you have to specify pos for either none or all fields in the dialog box.

There is a maximum of 7 lines of controls per page. Controls with more than 7 lines will be placed in subsequent pages. If more than one page is created, titles can be a list of titles.

Maybe this helps?

Cheers, Terje
Find all posts by this user
Quote this message in a reply
02-17-2016, 02:55 PM
Post: #4
RE: Problem with negative numbers for INPUT function
UncleJohn
please more examples, option 1 and 2 is easy but how use checkbox and radio group
Find all posts by this user
Quote this message in a reply
Post Reply 




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