Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
About
Team
Rules
Stats
Status
Sitemap
Chat
Downloads
Forum
News
Our Projects
Major Community Projects
Recent Posts
Unread Posts
Replies
Tools
SourceCoder3
Other Things...
Omnimaga Radio
TI-83 Plus ASM File Unsquisher
Z80 Conversion Tools
IES TI File Editor
Free RAM areas
Comprehensive Getkeyr table
URL Shortener
Online Axe Tilemap Editor
Help
Contact Us
Change Request
Report Issue/Bug
Team
Articles
Members
View the memberlist
Search For Members
Buddies
Login
Register
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
Axe
(Moderator:
Runer112
) »
HBJ needs some string help.
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: HBJ needs some string help. (Read 4835 times)
0 Members and 1 Guest are viewing this topic.
Happybobjr
James Oldiges
LV11
Super Veteran (Next: 3000)
Posts: 2325
Rating: +128/-20
Howdy :)
HBJ needs some string help.
«
on:
January 10, 2012, 05:43:50 pm »
Ok, so i have 152 strings in an appvar, and each is 10 characters (1-byte) long.
Well the names in them are between 3 and 10 characters long, but i only know how to call on them if their length is uniform.
for example... "natham____" (_ = space)
Is there any more efficient ways to do this?
Logged
School: East Central High School
Axe: 1.0.0
TI-84 +SE ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire ||| Lent out, and never returned
____________________________________________________________
Quigibo
The Executioner
CoT Emeritus
LV11
Super Veteran (Next: 3000)
Posts: 2031
Rating: +1075/-24
I wish real life had a "Save" and "Load" button...
Re: HBJ needs some string help.
«
Reply #1 on:
January 10, 2012, 06:57:48 pm »
Since I've seen this asked several times, I decided to add a command for it to the next version
But for now, you can do this using the fact that each string is zero terminated. All you have to do is start at the pointer and then increase it until you pass N zeros to get the Nth string.
«
Last Edit: January 10, 2012, 06:58:34 pm by Quigibo
»
Logged
___Axe_Parser___
Today the calculator, tomorrow the world!
Happybobjr
James Oldiges
LV11
Super Veteran (Next: 3000)
Posts: 2325
Rating: +128/-20
Howdy :)
Re: HBJ needs some string help.
«
Reply #2 on:
January 10, 2012, 06:59:15 pm »
Thanks
Logged
School: East Central High School
Axe: 1.0.0
TI-84 +SE ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire ||| Lent out, and never returned
____________________________________________________________
Runer112
Project Author
LV11
Super Veteran (Next: 3000)
Posts: 2289
Rating: +639/-31
Re: HBJ needs some string help.
«
Reply #3 on:
January 10, 2012, 07:04:39 pm »
Why add a whole new command for it? Just make
Data()
not barf when you put static data inside of it, and making speedy data LUTs with anonymous entries would be a piece of cake.
Data("Hello"
r
,"there!"
r
,"I"
r
,"am"
r
,"a"
r
,"LUT"
r
,"of"
r
,"strings."
r
)→Str0
«
Last Edit: January 10, 2012, 07:07:55 pm by Runer112
»
Logged
Quigibo
The Executioner
CoT Emeritus
LV11
Super Veteran (Next: 3000)
Posts: 2031
Rating: +1075/-24
I wish real life had a "Save" and "Load" button...
Re: HBJ needs some string help.
«
Reply #4 on:
January 10, 2012, 07:16:26 pm »
@Runer, that wasn't what I was referring to... the actual lookup table is easy enough to generate already: "Hello"[00]"World"[00]"GoodBye"[00] etc. I was referring to a command that takes the table and an index and the returns the pointer to that string.
EDIT:
Also, I just realized you were talking about something entirely different. That type of command is difficult with Axe's limited memory because you can't determine where to put the static data until the size of the Data() command is known.
«
Last Edit: January 10, 2012, 07:23:22 pm by Quigibo
»
Logged
___Axe_Parser___
Today the calculator, tomorrow the world!
Runer112
Project Author
LV11
Super Veteran (Next: 3000)
Posts: 2289
Rating: +639/-31
Re: HBJ needs some string help.
«
Reply #5 on:
January 10, 2012, 07:23:40 pm »
I figured that you weren't referring to the method I was. Your method is the size-optimized method, mine is the speed-optimized method.
Your method would take n+1 bytes of storage for each entry and lookups would run in linear time, whereas my method would take n+2 bytes of storage for each entry and lookups would run in constant time. Unfortunately, my method doesn't work because Axe won't let me put static data inside of
Data()
.
EDIT:
Just read your edit, and I guess that's true. Unless there's some way to get around it by determining the
Data()
pointer in the first pass and the anonymous data entry pointers in the second pass, but if there was, you would know better than I.
«
Last Edit: January 10, 2012, 07:25:56 pm by Runer112
»
Logged
Quigibo
The Executioner
CoT Emeritus
LV11
Super Veteran (Next: 3000)
Posts: 2031
Rating: +1075/-24
I wish real life had a "Save" and "Load" button...
Re: HBJ needs some string help.
«
Reply #6 on:
January 10, 2012, 07:26:15 pm »
But you can always store the data to static pointers first and
then
put them in the Data() after.
«
Last Edit: January 10, 2012, 07:27:00 pm by Quigibo
»
Logged
___Axe_Parser___
Today the calculator, tomorrow the world!
Print
Pages: [
1
]
Go Up
« previous
next »
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
Axe
(Moderator:
Runer112
) »
HBJ needs some string help.