Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Your Projects subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Celtic III => Your Projects
Author Message
JoeYoung


Advanced Member


Joined: 15 Nov 2008
Posts: 316

Posted: 09 Aug 2009 10:51:48 am    Post subject:

README wrote:
[font="Courier New"]-----------------------------------------------------------------------------
|23.............| det(23,"FILENAME","INDEXNAME")
|...............|
|..INDEXFILE....| Creates an index of a program file and stores it as another
|[font="Courier New"]...............[font="Courier New"]| program file as indicated by INDEXNAME. This is for use
|[font="Courier New"]...............[font="Courier New"]| with the following command.
|[font="Courier New"]...............[font="Courier New"]|
|[font="Courier New"]...............[font="Courier New"]| Any pre-existing files will be overwritten automatically,
|[font="Courier New"]...............[font="Courier New"]| as if to udate the index, so please take care that an
|[font="Courier New"]...............[font="Courier New"]| important file is not specifed. If the new index cannot
|[font="Courier New"]...............[font="Courier New"]| be fit in memory after the old one is deleted, a new one
|[font="Courier New"]...............[font="Courier New"]| is not created.
|[font="Courier New"]...............[font="Courier New"]|
-----------------------------------------------------------------------------
|24.............| det(24,"FILENAME","INDEXNAME",this_line,[by_this_many])
|[font="Courier New"]...............[font="Courier New"]|
|..LOOKUPINDEX..| Uses the index file specified for quicker and much more
|[font="Courier New"]...............[font="Courier New"]| consistent lookup of lines in a file. Very useful for large
|[font="Courier New"]...............[font="Courier New"]| data files that would take a while to scan through using
|[font="Courier New"]...............[font="Courier New"]| the normal lookup method.
|[font="Courier New"]...............[font="Courier New"]|
|[font="Courier New"]...............[font="Courier New"]| The major drawback is that once a file is indexed, the file
|[font="Courier New"]...............[font="Courier New"]| cannot be changed unless re-indexed by command 23.
|[font="Courier New"]...............[font="Courier New"]|
|[font="Courier New"]...............[font="Courier New"]| A good feature is that for purely read-only purposes,
|[font="Courier New"]...............[font="Courier New"]| BOTH the program and index files can be archived.
-----------------------------------------------------------------------------


In my game, these programs could be incredibly useful for speed optimization, as all Pokemon data is saved in strings.

Larger variables that hold pokemon data, like stats, text, and sprite hex, take longer to pull up as you approach species number above 100. The difference in time to pull up Mewtwo is noticeably longer than when pulling up Bulbasaur.

I focused my attention on these two commands, since by description they seem to be a feasible answer. However, by that same description, I have not been able to get the commands to work as intended. My closest victory was recalling text and names, but the ends of the strings were always screwed up when placed on the graph screen (I have't yet checked the end of the variable itself).

I believe I am not using the commands correctly. Could someone explain, in more detail, how to properly uses these instructions? If asked, I can provide the offending code, and the database I'm using.
Back to top
simplethinker
snjwffl


Active Member


Joined: 25 Jul 2006
Posts: 700

Posted: 09 Aug 2009 12:51:26 pm    Post subject:

metagross111 wrote:
I focused my attention on these two commands, since by description they seem to be a feasible answer. However, by that same description, I have not been able to get the commands to work as intended. My closest victory was recalling text and names, but the ends of the strings were always screwed up when placed on the graph screen (I have't yet checked the end of the variable itself).

The det(24 command (LOOKUPINDEX) doesn't strip newlines off the end of the string. One way to get around this is use sub(Ans,1,length(Ans)-1 after each time you use det(24.


Last edited by Guest on 05 Jul 2010 08:17:17 am; edited 1 time in total
Back to top
JoeYoung


Advanced Member


Joined: 15 Nov 2008
Posts: 316

Posted: 09 Aug 2009 01:29:05 pm    Post subject:

OOOH, I get it now. I guess I was doing it right, but that pesty newline character WOULD mess things up for me, eh?

EDIT: After thinking about it, I realized it was probably there for pulling program commands, so it would keep the newline char :/


Last edited by Guest on 09 Aug 2009 02:24:06 pm; edited 1 time in total
Back to top
simplethinker
snjwffl


Active Member


Joined: 25 Jul 2006
Posts: 700

Posted: 09 Aug 2009 05:27:24 pm    Post subject:

metagross111 wrote:
EDIT: After thinking about it, I realized it was probably there for pulling program commands, so it would keep the newline char :/

The LINEWRITE command automatically appends a newline, so you'd be getting double the newlines. With LINEREPLACE it doesn't overwrite the newline that was already there, so you'd be getting an extra newline as well.

simplethinker wrote:
One way to get around this is use sub(Ans,1,length(Ans)-1 after each time you use det(24.

As I was trying to figure out a fix I realized that there's no newline on the final line of the program, so if you read the last line and use the sub( thing you'll be losing a character.


Last edited by Guest on 05 Jul 2010 08:17:32 am; edited 1 time in total
Back to top
JoeYoung


Advanced Member


Joined: 15 Nov 2008
Posts: 316

Posted: 09 Aug 2009 08:07:51 pm    Post subject:

simplethinker wrote:
metagross111 wrote:
EDIT: After thinking about it, I realized it was probably there for pulling program commands, so it would keep the newline char :/

The LINEWRITE command automatically appends a newline, so you'd be getting double the newlines. With LINEREPLACE it doesn't overwrite the newline that was already there, so you'd be getting an extra newline as well.

simplethinker wrote:
One way to get around this is use sub(Ans,1,length(Ans)-1 after each time you use det(24.

As I was trying to figure out a fix I realized that there's no newline on the final line of the program, so if you read the last line and use the sub( thing you'll be losing a character.



I haven't tested anything out yet, but this means... what exactly? The sub( idea won't work? Perhaps the program should be altered to leave out the newline then.

EDIT: Oh wait, you said there's no newline. Well.... then I have no idea what the heck is going wrong. I guess I'll need to experiment more with it Sad


Last edited by Guest on 05 Jul 2010 08:16:59 am; edited 1 time in total
Back to top
simplethinker
snjwffl


Active Member


Joined: 25 Jul 2006
Posts: 700

Posted: 10 Aug 2009 09:36:41 am    Post subject:

metagross111 wrote:
EDIT: Oh wait, you said there's no newline. Well.... then I have no idea what the heck is going wrong. I guess I'll need to experiment more with it Sad

There's no newline on the final line, but for all the others there is one (since newlines are placed between lines, not at the ends of lines).
Back to top
JoeYoung


Advanced Member


Joined: 15 Nov 2008
Posts: 316

Posted: 10 Aug 2009 01:34:52 pm    Post subject:

simplethinker wrote:
metagross111 wrote:
EDIT: Oh wait, you said there's no newline. Well.... then I have no idea what the heck is going wrong. I guess I'll need to experiment more with it Sad

There's no newline on the final line, but for all the others there is one (since newlines are placed between lines, not at the ends of lines).


OH, ok. I'm only recalling one line at a time for data retrieval, so each of those lines would have a newline symbol on the end. that sub thing can be modified slightly to only remove the char from lines that need it. thanks much.
Back to top
Iambian


Advanced Member


Joined: 13 Mar 2004
Posts: 423

Posted: 10 Aug 2009 09:12:09 pm    Post subject:

The newline thing is being addressed. Please patiently wait for the next release. Maybe soon?

EDIT: The command pair discussed in this topic has been addressed. Version "s" does not have the problem mentioned in this thread anymore.


Last edited by Guest on 20 Aug 2009 11:48:09 pm; edited 1 time in total
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are GMT - 5 Hours

 

Advertisement