Post Reply 
Why do characters get interpreted as algebraics?
05-21-2014, 03:27 PM
Post: #2
RE: Why do characters get interpreted as algebraics?
(05-21-2014 01:22 PM)HP67 Wrote:  My post just disappeared. Let's try again.

Why do unquoted characters get interpreted as algebraics? I would like to be able to enter

something

and have it interpreted as "something" which has a SIZE of 9.

instead it gets interpreted as 'something' with SIZE of 1.

->STR makes it into "'something'", so some code is required to strip the single quotes and make it the string I really wanted.

Do we require that strings be entered double-quoted, or is there some more light that can be shed on this? Thanks.

I'm assuming that your question pertains to the RPL environment. Smile

I doubt you'll find the answer to your question in any documentation, but I suspect that it's simply because the designers thought it more likely that a user would use the system for symbolic and/or algebraic calculations than string manipulations, so the default behavior for an un-quoted string placed on the stack is to assume that it's either a symbol or name (as opposed to a string).

So the basic answer is: yes, you need to supply the double-quotes initially to signal that you're typing in a string as opposed to a name.

My 48sx was stolen years ago, but I believe that has been the default mode of operation for all the RPL calcs.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Why do characters get interpreted as algebraics? - DavidM - 05-21-2014 03:27 PM



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