Author Topic: What am I doing wrong here?  (Read 25524 times)

0 Members and 1 Guest are viewing this topic.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: What am I doing wrong here?
« Reply #15 on: February 24, 2011, 03:26:18 pm »
This seems to work for me:

Code: [Select]
[015D]"M"→Str1
GetCalc(Str1)→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: What am I doing wrong here?
« Reply #16 on: February 24, 2011, 03:32:35 pm »
I thought ʟ got translated as $5D... Not sure anymore because I deleted Calcsys.




Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: What am I doing wrong here?
« Reply #17 on: February 24, 2011, 03:35:53 pm »
Not on the calc... that little L thingy is EB, but CheckFindSym does not read that as 5Dh, unfortunately, so you have to convert it in case like these. Whenever I copy a user string to OP1 as a name of a var, I have code that checks that byte and converts it if it is EB to 5D.

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: What am I doing wrong here?
« Reply #18 on: February 24, 2011, 03:37:46 pm »
Quote
[015D]"M"→Str1
GetCalc(Str1)→P
It works for me, too! Thank-you muchly!

Edit:
Now if only I could figure out what, exactly, P is pointing to....
« Last Edit: February 24, 2011, 04:02:55 pm by Freyaday »
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

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: What am I doing wrong here?
« Reply #19 on: February 24, 2011, 03:42:35 pm »
Not on the calc... that little L thingy is EB, but CheckFindSym does not read that as 5Dh, unfortunately, so you have to convert it in case like these. Whenever I copy a user string to OP1 as a name of a var, I have code that checks that byte and converts it if it is EB to 5D.

Ah, I thought Axe would read it as $5D like how it reads prgm as $05/$06.




Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: What am I doing wrong here?
« Reply #20 on: February 24, 2011, 03:46:39 pm »
Hehe, that is CheckFindSym doing the work there. bcall(_CheckFindSym) lets you interchange programs/protected, lists/complex lists, equ/new equ, and real/complex. So if you search for the complex list "L1" you can use either 01 or 0D as the type byte :D

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: What am I doing wrong here?
« Reply #21 on: February 24, 2011, 04:21:16 pm »
Didn't know that. I used to set it up to check for both cases... This'll save some bytes :-\




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: What am I doing wrong here?
« Reply #22 on: February 24, 2011, 04:21:45 pm »
Welcome on the forums Freyaday!
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: What am I doing wrong here?
« Reply #23 on: February 24, 2011, 04:25:59 pm »
Didn't know that. I used to set it up to check for both cases... This'll save some bytes :-\
It is a very useful trick that I love taking advantage of ^-^
As another trick, rFindSym will not find programs or other named vars, but it doesn't need the type byte :D
Out of randomness, I created a routine that is like rFindSym except the name is in the register BC instead of in OP1 >_> It returns the same results, too :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: What am I doing wrong here?
« Reply #24 on: February 24, 2011, 04:27:48 pm »
Didn't know that. I used to set it up to check for both cases... This'll save some bytes :-\
It is a very useful trick that I love taking advantage of ^-^
As another trick, rFindSym will not find programs or other named vars, but it doesn't need the type byte :D

Yep, it was one of the tricks 28 Days mentioned.

Out of randomness, I created a routine that is like rFindSym except the name is in the register BC instead of in OP1 >_> It returns the same results, too :P

I wonder why TI didn't do that. It wouldn't support named lists, though, right?




Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: What am I doing wrong here?
« Reply #25 on: February 24, 2011, 04:28:27 pm »
Edit:
Now if only I could figure out what, exactly, P is pointing to....

P points to the first element in the list. If the list is a real number list, you can find each 9-byte floating point element at N*9+P, where N is the element's index in the list (0-based). If it's a complex list, the elements will be at N*18+P. The 2 bytes immediately before the location P points to contain a value specifying how many values are in the list, which can be read with {P-2}r.

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: What am I doing wrong here?
« Reply #26 on: February 24, 2011, 04:30:19 pm »
Whoops, missed that edit. And just for clarification on Runer112's post, use float{N*9+P} to get the value of an element :)
« Last Edit: February 24, 2011, 04:30:28 pm by Deep Thought »




Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: What am I doing wrong here?
« Reply #27 on: February 24, 2011, 04:30:26 pm »
Out of randomness, I created a routine that is like rFindSym except the name is in the register BC instead of in OP1 >_> It returns the same results, too :P

I wonder why TI didn't do that. It wouldn't support named lists, though, right?
Right, but neither does rFindSym, unfortunately :(

Offline 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...
    • View Profile
Re: What am I doing wrong here?
« Reply #28 on: February 24, 2011, 04:39:15 pm »
Hmm... this is a bug then.  The L token is supposed to translate to [015D]... I will fix this next version.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: What am I doing wrong here?
« Reply #29 on: February 25, 2011, 09:40:14 pm »
But I need to read the nibbles and I can't figure out which ones to read. That, and I somehow created an infinite for loop.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!