Post Reply 
Detect number entry on HP-35s?
02-25-2015, 08:24 PM
Post: #13
RE: Detect number entry on HP-35s?
(02-25-2015 07:12 PM)Dieter Wrote:  So you want to enter a matrix. How does the program know its dimensions (#columns, #lines), resp. when is a line in step 7 considered "filled"? Do you want to enter line by line or column by column?

column by column

Quote:Or do you assume one line is complete as soon as no entry occurs?

yes, then save the number of rows into a variable.

Quote:How do you then handle lines with different dimensions (# of columns)? If the first line had 3 values and the second one 5, how do you plan to access the, say, 4th element of the 2nd line?

It would continue filling columns, cycling through row variable. The array is complete when the user doesn't make an entry.

Quote:While the program waits for input, it displays a vector like [1, 1] with line# and column# in X. Now, getting back to your request, if the user does not enter anything the entry will be a vector. If you now could check whether X holds a simple real (=entry) or a vector (=no entry), your problem was solved.

Dieter

That might actually work. Thanks!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Detect number entry on HP-35s? - mbrethen - 02-25-2015, 03:37 AM
RE: Detect number entry on HP-35s? - mbrethen - 02-25-2015 08:24 PM
RE: Detect number entry on HP-35s? - d b - 02-26-2015, 06:31 AM



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