Post Reply 
STO+ adds to front of string, not end
09-25-2017, 09:14 AM
Post: #1
STO+ adds to front of string, not end
From the entry line, doing the following combines two strings properly.
Code:

"ABC" "DEF" +

I decided I wanted to stuff these into a variable and add the second bit manually, except I came up against a small problem.

Code:

"ABC" 'J' STO+ @results in the following and an error box:

2: "ABC"
1: 'J'
ErrorBox("STO+ Error", Undefined Name)

So obviously STO+ relies on the variable being initialised already. Fair enough, though I haven't found it mentioned explicitly (yet).

Once I created the variable J I tried this:
Code:

"ABC" 'J' STO+ @results in "ABC"
"DEF" 'J' STO+ @results in "DEFABC"

Why is this? Or do I just have something wrong here? I'm mainly using the AUR at the moment, as I don't have the other two documents (UM/UG) in hard-copy, only in PDF.

(Note): This is related to a program I'll post in another thread.

(Post 96)

Regards, BrickViking
HP-50g |Casio fx-9750G+ |Casio fx-9750GII (SH4a)
Visit this user's website Find all posts by this user
Quote this message in a reply
09-25-2017, 09:24 AM
Post: #2
RE: STO+ adds to front of string, not end
Hi

Try 'J' "DEF" STO+
Find all posts by this user
Quote this message in a reply
09-25-2017, 09:49 AM
Post: #3
RE: STO+ adds to front of string, not end
(09-25-2017 09:24 AM)Gilles59 Wrote:  Hi

Try 'J' "DEF" STO+

same with list. STO<op> is pretty flexible.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
Post Reply 




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