Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Giacomo Pigani

Pages: [1]
1
General Calculator Help / TI-89 scrollable formula
« on: July 12, 2017, 06:00:08 pm »
Hi, I switched to a TI-89 from a ti 84 recently, and I think this calculator is very powerful.
However, on the ti 84 I used a program named PrettyPrint which allowed me to display formulas from a basic program.

This program had a really nice feature: basically, if the formula was very large and couldn't fit the screen, I could use the right and left arrows to move back and forth.

Now, on the ti 89 I found plenty of programs to display formulas, however all of them use the system call to prettyprint a string, so if a formula is bigger than the screen, it gets chopped.

Now, does any of you know of a program that can help me out?

Thanks!



This one looks promising, judging from the preview: http://www.ticalc.org/archives/files/fileinfo/398/39896.html

Edit (Eeems): Merged double post

2
TI-BASIC / Help overcoming Symbolic bug
« on: November 07, 2016, 06:59:00 am »
I found a very annoying little bug with Symbolic

Code: [Select]
If 1=1:Then
    "X*X^2"→Str1
    "2*3"→Str2
   
    ClrHome
    Disp real(13,Str1)
    Disp real(13,Str2)
End

//Output:
// X^3 : Ok
// X^3 : Not Ok

Basically, if I want to use the simplify function more than once inside an If statement and the functions I want to simplify are in a string, simplify will refuse to give the correct result. In this case for example, it returns the previous result.

However, if the actual string to simplify is given things seems to work out:

Code: [Select]
If 1=1:Then   
    ClrHome
    Disp real(13,"X*X^2")
    Disp real(13,"2*3")
End

//Output:
// X^3 : Ok
// 6   : Ok

3
TI-BASIC / Convert decimal to fraction as a string (TI-84)
« on: October 22, 2016, 05:47:18 pm »
Hi, I've wrote some programs in basic which make use of PrettyPrint (and symbolic to use pretty from my basic program)
Now, PrettyPrint takes it's input as a string, and for that I already use BatLib to convert numbers to strings, however I would like that if I have, let's say 0.375, to just be 1/8, which PrettyPrint displays in a nice form.

The TI-84 has a nice little function >Frac which converts an integer into a fraction and displays it in a nice way, hower I can't get the value as a string, nor get the nominator and denominator.

Looking around I found Zfrac, which deals with issue
Code: [Select]
call _ZeroOP1
ld hl,OP1+1
ld (hl),'W'
call _RclVarSym
call _ToFrac
call _PushRealO1
call _ZeroOP1
ld hl,'W'
ld (OP1+1),hl
call _StoOther
call _OP1ExOP2
call _PushRealO1
call _ZeroOP1
ld hl,'I'
ld (OP1+1),hl
call _StoOther
ret

What the code seems to be doing is taking advantage of the _ToFrac system call and then getting the output. This should then save the nominator and the denomitor to W and I, however I haven't been able to compile it or to get the compiled version to work (Yes, I used: Asm(prgmZCALC)


What I'd like, if somebody knows how is to have something like this:
"X^("+frac2str(0.375)+"*2)"-->Str1


Thank you!

4
The Axe Parser Project / Read lowercase letters from Ti-Basic string
« on: December 03, 2015, 04:47:49 am »
Let's say that in a normal Ti-Basic program i create a string like this:

Code: [Select]
"Lorem ipsum dolor"->Str1
And then I have and Axe program I made to display text.

To display I do something like this (oversimplified example)
I like it this way so I can do some checks on A, reduce pixels from one letter to another and so on...

Code: [Select]
{S+C}→A
while A≠0
Text(J,I,°A)
{S+C}→A
End

If I take the variable like this, only uppercase letter work (I think it has something to with 1 byte and 2 bytes tokens)
Code: [Select]
"Str1"→Str1
GetCalc(Str1)→S

However, directly assigning a string in Axe works (I read somewhere that all letters use 1 byte in axe)
Code: [Select]
"Lorem ipsum dolor"->S

I found this question which seems linked to my problem, but I'm not entirely sure and it also got no answers.
Here Runer112, says "TI Program Editor parses these as these special tokens and not lowercase letters. Due to this, they turn into garbage when parsed inside strings by Axe".
https://www.omnimaga.org/the-axe-parser-project/features-wishlist/msg132719/?topicseen#msg132719



Maybe I'll take a look at TokenIde to see if something can be done. Otherwise I though the Copy function could have been of help. Do you know any solutions?

Pages: [1]