Author Topic: Fun with strings!  (Read 8315 times)

0 Members and 1 Guest are viewing this topic.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Fun with strings!
« Reply #15 on: December 15, 2010, 03:58:39 pm »
You can put it in a string through Y=. If you type it on the homescreen and RCL it to the Y= prompt, you can do whatever you want with it.




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Fun with strings!
« Reply #16 on: December 15, 2010, 04:06:18 pm »
It doesn't work. When I type the STO char in Y= it does nothing. It won't let me type it ???

Offline lookitsan00b

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 173
  • Rating: +37/-3
    • View Profile
Re: Fun with strings!
« Reply #17 on: December 15, 2010, 04:35:26 pm »
It doesn't work. When I type the STO char in Y= it does nothing. It won't let me type it ???

1: type "-> on the homescreen, press enter, then quit (when it gives an error)
2: go to Y= and push [2nd][Enter].

that should do it!

but c'mon guys there has to be another way... like:

Code: [Select]
:If inString("every_single_token_except_"_and_->",sub(Str1,1,1))
:Else
...
:End

I could use XTRACHAR for that... I keep it on-calc at all times :P

But it'll run horribly slow.
« Last Edit: December 15, 2010, 04:37:04 pm by lookitsan00b »
My TI-94+SE is broken.  I used some flawed existential conditioning on it, and it crashed. :(

Activity level:
{====______}

Spoiler For Securite:
{=========_}

A couple security flaws
Need a good backdoor short of reinstalling the OS
Completely immobilized and invalidated by Zstart. And rendered incompatible.
Spoiler For FFTATIA:
{====______}

framework: mostly done
graphics engine: undergoing complete rewrite
still need character and enemy sprites!!! :P

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Fun with strings!
« Reply #18 on: December 15, 2010, 04:50:50 pm »
Nope, unfortunately there's no way at all to check unless you (1) have an ASM sub or (2) already have the chars stored in a string, like with the Y= trick.




Offline lookitsan00b

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 173
  • Rating: +37/-3
    • View Profile
Re: Fun with strings!
« Reply #19 on: December 15, 2010, 05:31:11 pm »
are you saying there's a length limit with inString(?

I cant do inString("ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz {[max(min(int(fPart(...etc...GarbageCollect",sub(Str1,1,1)) ???

because, then, by process of elimination, it has to be " or -> (or be something like sub(, which'll return a string anyways ) >:D

as I said, that'd run really slow :-\
My TI-94+SE is broken.  I used some flawed existential conditioning on it, and it crashed. :(

Activity level:
{====______}

Spoiler For Securite:
{=========_}

A couple security flaws
Need a good backdoor short of reinstalling the OS
Completely immobilized and invalidated by Zstart. And rendered incompatible.
Spoiler For FFTATIA:
{====______}

framework: mostly done
graphics engine: undergoing complete rewrite
still need character and enemy sprites!!! :P

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Fun with strings!
« Reply #20 on: December 15, 2010, 05:32:18 pm »
It would worlk, but there are over 9000 different possible tokens you can have on the calculator, so it would be incredibly inefficient, slow, and large.  Maybe if you tell us exactly what you want to accomplish we can see if there is a better way to accomplish what you are trying to do?

Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: Fun with strings!
« Reply #21 on: December 15, 2010, 05:37:37 pm »
This might be a start.
You can check if Ans is a number or a String with these methods, but I'm not sure how helpful it is for what you're trying to do.


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Fun with strings!
« Reply #22 on: December 15, 2010, 06:26:55 pm »
I was looking for that! Thanks, Finale. I thought it was on TIBD though but oh well, at least it was found.

From what I understand he is trying to get the user to input something, a list, a string, a number, a matrix, or whatever, and then he stores it into u (for a reason I don't understand because it acts like a string except it outputs a number...) and then runs u through a series of tests to test what it is (a list, matrix, string, number, etc.).
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline lookitsan00b

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 173
  • Rating: +37/-3
    • View Profile
Re: Fun with strings!
« Reply #23 on: December 15, 2010, 06:44:23 pm »
lol that doesn't work with any input.  What about matrices?  >:D
My TI-94+SE is broken.  I used some flawed existential conditioning on it, and it crashed. :(

Activity level:
{====______}

Spoiler For Securite:
{=========_}

A couple security flaws
Need a good backdoor short of reinstalling the OS
Completely immobilized and invalidated by Zstart. And rendered incompatible.
Spoiler For FFTATIA:
{====______}

framework: mostly done
graphics engine: undergoing complete rewrite
still need character and enemy sprites!!! :P

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Fun with strings!
« Reply #24 on: December 15, 2010, 09:18:26 pm »
Are you talking about the link that Finale gave? You could do checks for all of them but string and number and if it gets that far then you do that check to decide which it is.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline lookitsan00b

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 173
  • Rating: +37/-3
    • View Profile
Re: Fun with strings!
« Reply #25 on: December 15, 2010, 09:41:14 pm »
Are you talking about the link that Finale gave? You could do checks for all of them but string and number and if it gets that far then you do that check to decide which it is.

lol I know I just wanted to be evil :P
My TI-94+SE is broken.  I used some flawed existential conditioning on it, and it crashed. :(

Activity level:
{====______}

Spoiler For Securite:
{=========_}

A couple security flaws
Need a good backdoor short of reinstalling the OS
Completely immobilized and invalidated by Zstart. And rendered incompatible.
Spoiler For FFTATIA:
{====______}

framework: mostly done
graphics engine: undergoing complete rewrite
still need character and enemy sprites!!! :P

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Fun with strings!
« Reply #26 on: December 16, 2010, 04:44:55 am »
It doesn't work. When I type the STO char in Y= it does nothing. It won't let me type it ???

1: type "-> on the homescreen, press enter, then quit (when it gives an error)
2: go to Y= and push [2nd][Enter].

that should do it!

but c'mon guys there has to be another way... like:

Code: [Select]
:If inString("every_single_token_except_"_and_->",sub(Str1,1,1))
:Else
...
:End

I could use XTRACHAR for that... I keep it on-calc at all times :P

But it'll run horribly slow.
Ah that works! Too bad I can't display it with Output or something...

Offline lookitsan00b

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 173
  • Rating: +37/-3
    • View Profile
Re: Fun with strings!
« Reply #27 on: December 16, 2010, 09:15:05 am »
well that's when you use Equ->String(... :P
My TI-94+SE is broken.  I used some flawed existential conditioning on it, and it crashed. :(

Activity level:
{====______}

Spoiler For Securite:
{=========_}

A couple security flaws
Need a good backdoor short of reinstalling the OS
Completely immobilized and invalidated by Zstart. And rendered incompatible.
Spoiler For FFTATIA:
{====______}

framework: mostly done
graphics engine: undergoing complete rewrite
still need character and enemy sprites!!! :P

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Fun with strings!
« Reply #28 on: December 16, 2010, 09:45:09 am »
That can work inside Output(?

You seem to always find a solution to everything I post. Could you actually post your entire source code on how to display STO character inside a BASIC program on the home screen?

EDIT: Actually that works, thanks. I have bad memories about Equ>String, though O.O (See the TI-OS glitches section)
« Last Edit: December 16, 2010, 09:46:16 am by DJ Omnimaga »

Offline c.sprinkle

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 221
  • Rating: +23/-1
  • There ain't no rest for the wicked? True indeed.
    • View Profile
    • The Corread on NationStates.
Re: Fun with strings!
« Reply #29 on: December 16, 2010, 10:37:55 am »
MathPrint OSes are just a bunch of glitches.  >:(