Post Reply 
Emu48 Locate Character in a String
03-25-2021, 01:37 AM (This post was last modified: 03-25-2021 01:47 AM by MNH.)
Post: #1
Emu48 Locate Character in a String
Is there an Emu48 function similar to Java's indexOf() method? I can load a text file

7,5000.0000,5000.0000,5/8 IRC SSMC LB 2108
8,5400.0000,5000.0000,5/8 IRC SSMC LB 2108
9,5400.0000,5400.0000,4X4 CM
10,5000.0000,5400.0000,4X4 CM

into the Emu48, which appears on the stack as a string with a CR character at the end of each line.
I figure I can remove a substring of the string at the CR character and store each substring in a list. Speaking of CR characters, how come there are so many of them in CHARACTERS 0-63? How do I know which CR character is being used? My list of lists will be in the form

{ { 7.0000
[ 5000.0000 5000.0000 ]
"5/8 IRC SSMC LB 2108"
} { 8.0000
[ 5400.0000 5000.0000]
"5/8 IRC SSMC LB 2108"
} }

and so on.
Find all posts by this user
Quote this message in a reply
03-25-2021, 02:58 AM
Post: #2
RE: Emu48 Locate Character in a String
This isn't an Emu48 question. It's a question about whatever calculator you are emulating with it (you didn't specify which makes it difficult to help you), so this should be asked in the General forum instead.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-25-2021, 09:25 AM
Post: #3
RE: Emu48 Locate Character in a String
(03-25-2021 02:58 AM)Eric Rechlin Wrote:  This isn't an Emu48 question.
Okay. Will reword and place in the appropriate forum.
Find all posts by this user
Quote this message in a reply
Post Reply 




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