Hello friends! I am very new to coding, but recently managed to help my friend make a well-rounded math program for ALG1-ALG2. Originally we coded this ON the TI-84PCE (very time consuming) and it took a span of about 20 Study Halls. Anyhow, I tried to give this to my friend who uses a TI-84 plus, but it gave an error in the Factor sub-program. The error is found on the line that says
:Output(Ans,1, "COEF. OF X^
Can someone please tell me how to fix this or what we did wrong? I figured since it's TI-Basic it should be compatible with all models. Thanks in advance.
(PRGM BELOW)

Code:
```ClrHome Output(3,6,"THE MATH PROGRAM Output(5,7,"[e]CHELON CODING Output(7,8,"Prgmr: Roy B. Pause Lbl N ClrHome Menu("CHOOSE:","QUADRATIC",1,"DISTANCE",2,"MIDPOINT",3,"SLOPE",4,"TRI DISTANCE",5,"PYTHAGOREAN",6,"FACTOR",7 Lbl 1 Disp "AX^^2+BX+C=0 Prompt A,B,C B^^2-4AC->D FnOff :PlotsOff AxesOff:GridOff ClrDraw Text(30,1,"[x1],[x2]=------------- Text(20,56-6(B>0),~B,"+-sqrt(",D,") 2int(log(abs(2A Text(40,max(56,84-Ans-6(A<0)),2A Text(90,1,"VERTEX:",~B/(2A),",",C-B^^2/(4A Pause AxesOn:FnOn If D>0 sqrt(D->D If D<0 [i]sqrt(~D->D If imag(D) or fPart(abs(D Then    Disp "-NOT FACTORABLE-    Else    gcd(abs(A),gcd(abs(B),abs(C->E    A/E->A    B/E->B    C/E->C    D/E->D    D-B->M    gcd(abs(2A),abs(M->F    M/F->M    2A/F->N    ~B-D->O    gcd(abs(2A),abs(O->F    O/F->O    2A/F->P    If A<0    Then       ~M->M       ~N->N       ~O->O       ~P->P    End    Output(5,1,"FACTORS:    6->K    Output(K,1,"~    1+(A<0    Output(K,Ans,E    Ans+int(log(E)+(E!=1    Repeat K>7       Output(K,Ans,"(       Output(K,Ans+1,N       Ans+2+int(log(N)+(N!=1       Output(K,Ans-1,"X       If M       Then          Output(K,Ans,"-          If M<0          Output(K,Ans,"+          Output(K,Ans+1,abs(M          Ans+int(2+log(abs(M       End       If Ans<=16       Output(K,Ans,")       K+1->K       O->M       P->N       1    End    Pause End Disp "[x1],[x2]=    ",(D-B)/(2A>Frac Pause (~B-D)/(2A>Frac Goto 8 Lbl 2 Input "X1?",A Input "Y1?",B Input "X2?",C Input "Y2?",D (C-A)^^2+(D-B)^^2->E For(F,int(sqrt(E)),2,~1)    If fPart(E/F^^2 End If F E/F^^2->E ClrHome Disp "DISTANCE: 1->K Output(2,K,F (F>1)+K+int(log(F->K Output(2,K,"sqrt( Output(2,K+1,E Output(3,1,Fsqrt(E Pause Goto 8 Lbl 3 Input "X1?",A Input "Y1?",B Input "X2?",C Input "Y2?",D ClrHome Disp "X=",(A+C)/2,"Y=",(B+D)/2 Pause Goto 8 Lbl 4 0->I:rand->C Menu("CHOOSE:","TWO POINTS",A,"POINT+SLOPE",B,"EQUATION",C Lbl A Input "X1?",A Input "Y1?",B Input "X2?",C Input "Y2?",D If A=C and B=D Then    Disp "NO LINE    Stop End If C-A Then    (D-B)/(C-A->S    D-CS->V    If S    ~V/S->I End Goto D Lbl B Input "X?",A Input "Y?",B Input "SLOPE?",S B-AS->V If S ~V/S->I Goto D Lbl C Input "SLOPE?",S Input "Y-INTERCEPT?",V If S ~V/S->I Lbl D GridOff:AxesOff:FnOff :PlotsOff :ClrDraw Text(0,0,"EQUATION: If C-A Then    If S and V>=0    Text(14,1,"Y=",S,"X+",V    If S and V<0    Text(14,1,"Y=",S,"X-",abs(V    If not(S    Text(14,1,"Y=",V    Text(30,1,"SLOPE=",S    Text(44,1,"Y-INTERCEPT=",V    If S or not(V    Text(58,1,"X-INTERCEPT=",I    If V and not(S    Text(58,1,"X-INTERCEPT=NONE    Else    Text(14,1,"X=",C    Text(30,1,"SLOPE=UNDEFINED    If C    Text(44,1,"Y-INTERCEPT=NONE    If not(C    Text(44,1,"Y-INTERCEPT=0    Text(58,1,"X-INTERCEPT=",C End Pause AxesOn:FnOn Goto 8 Lbl 5 Input "X1?",A Input "Y1?",B Input "X2?",C Input "Y2?",D Input "X3?",E Input "Y3?",F (A-C)^^2+(B-D)^^2->G (C-E)^^2+(D-F)^^2->H (A-E)^^2+(B-F)^^2->I For(F,int(sqrt(G)),2,~1)    If fPart(G/F^^2 End If F G/F^^2->G ClrHome Disp "DIST.1: 1->K Output(2,1,F (F>1)+K+int(log(F->K Output(2,K,"sqrt( Output(2,K+1,G Output(3,1,Fsqrt(G Pause For(F,int(sqrt(H)),2,~1)    If fPart(H/F^^2 End If F H/F^^2->H ClrHome Disp "DIST.2: 1->K Output(2,1,F (F>1)+K+int(log(F->K Output(2,K,"sqrt( Output(2,K+1,H Output(3,1,Fsqrt(H Pause For(F,int(sqrt(I)),2,~1)    If fPart(I/F^^2 End If F I/F^^2->I ClrHome Disp "DIST.3: 1->K Output(2,1,F (F>1)+K+int(log(F->K Output(2,K,"sqrt( Output(2,K+1,I Output(3,1,Fsqrt(I Pause Goto 8 Lbl 6 rand->X Prompt A,B,C C->D If C!=X max(A,max(B,C->C If C!=D and A=C D->A If C!=D and B=C D->B 0->D If A=X C^^2-B^^2->D If B=X C^^2-A^^2->D If C=X A^^2+B^^2->D If A=X and B=X C^^2/2->D If C=X and (B=X or A=X 0->D If D>0 Then    Disp sqrt(D    fPart(sqrt(D    If Ans=round(Ans,3    Goto 8    Disp "Or","    1->E    fPart(D    If |E~4>=min(Ans,1-Ans    Then       round(D,0->D       For(F,int(sqrt(D/2)),2,~1          If not(fPart(D/F^^2          Then             D/F^^2->D             F->E             2->F          End       End    End    1->G    Output(6,G,E    G+(E>1)+int(log(E->G    Output(6,G,"sqrt(    Output(6,G+1,D    Else    If A^^2+B^^2=C^^2    Then       Disp "Right triangle       Else       Disp "Not a right","triangle    End End Goto 8 Lbl 7 DelVar L1DelVar L2DelVar L3DelVar L4DelVar L5ClrHome ClrDraw:AxesOff FnOff :PlotsOff Input "DEGREE?",D 0->dim(L1 For(I,D,0,~1    2(D-I+1    If Ans>10    10    Output(Ans,1,"COEF. OF X^    Output(Ans,12,I    Disp "    Input C    C->L1(D-I+1 End D+1->D 0->C 0->R 0->Z 0->theta While not(L1(D    D-1->D    Z+1->Z End If 0>L1(1 Then    Text(R,C,"~    C+6->C    ~L1->L1 End L1(1->A For(I,2,dim(L1    gcd(A,abs(L1(I->A End If A L1/A->L1 If A>1 Then    Text(R,C,A    C+8+8int(log(A->C End If Z Then    Text(R,C,"X    C+8->C    If Z=2    Then       Text(R,C,"^^2       C+8->C    End    If Z>2    Then       Text(R,C,"^       Text(R,C+8,Z       C+16+8int(log(Z->C    End End If D=1 Goto 12 Lbl 9 1->Q 1->I For(J,1,2    abs(L1(I->A    {1->L2    2->B    While 2<Anot(fPart(A/2       Lbl 10       A/B->A       If fPart(max(L2)/B       L2->L4       augment(L4,BL2->L2    End    For(G,B+(B=2),sqrt(A),2)       If fPart(A/G    End    G->B    A->G    If B^^2<=A    Goto 10    augment(L2,AL2->L2    If I=1    L2->L3    D->I End 0->dim(L4 For(I,1,dim(L2    For(J,1,dim(L3       L2(I)/L3(J->L4(1+dim(L4    End End 0->dim(L2 0->dim(L3 SortA(L4 0->dim(L5 L4(1->L5(1 For(I,2,dim(L4    If L4(I-1)!=L4(I    L4(I->L5(1+dim(L5 End 0->dim(L4 dim(L5->B For(I,max(1,int(B/2)),B    L5(I->L4(1+dim(L4    B-I-1->J    If J>0 and J!=I    L5(J->L4(1+dim(L4 End 0->dim(L5 1->A Lbl 11 1->B Repeat B=2    D->E    L1(1->L2(1    For(I,2,D       L1(I)+L2(I-1)L4(A->L2(I    End    If not(L2(D    Then       abs(L4(A->Y       1->N       While Y>|E~7N          N/Y->N          fPart(Y^^-1->Y       End       If 1>fPart(N       iPart(N->N       round(N,0->N       round(NL4(A),0->F       Text(R,C,"(       C+6->C       If N>1       Then          Text(R,C,N          C+8+8int(log(N->C       End       Text(R,C,"X       If theta       Text(R,C,"X^^2       If theta       C+8->C       C+8->C       Text(R,C,"-       If F<0       Text(R,C,"+       C+8->C       If C>=220       DelVar CR+14->R       Text(R,C,abs(F       C+8+8int(log(abs(F->C       Text(R,C,")       C+6->C       D-1->D       D->dim(L2       L2/N->L1       NQ->Q    End    If D=E or D=1    2->B End If A<=dim(L4 Then    If 0>L4(A    Then       A+1->A       Else       ~L4(A->L4(A    End End If D>1 and Q<10 and A<=dim(L4 Goto 11 If D>1 and A<=dim(L4 Goto 9 theta+1->theta If D>1 and theta=1 Then    For(I,D,2,~1       If L1(I) and fPart((I-1)/2       3->theta    End    If theta=1    Then       {L1(1->L2       For(I,3,D,2          L1(I->L2(1+dim(L2       End       L2->L1       0->dim(L2       dim(L1->D    End End If D>1 and theta=1 Goto 9 If D>1 and theta=2 Then    {L1(1),0->L2    For(I,2,D       augment(L2,augment({L1(I)},{0->L2    End    dim(L2)-1->dim(L2    L2->L1    0->dim(L2    dim(L1->D End If D>1 Then    Text(R,C,"(    C+6->C    For(I,1,dim(L1       D-I->J       L1(I->A       If A       Then          If A<0 and I=1          Then             Text(R,C,"~             C+8->C          End          If I>1          Then             Text(R,C,"-             If 0<A             Text(R,C,"+             C+8->C          End          If C>=200          DelVar CR+14->R          If 1<abs(A) or not(J          Then             Text(R,C,abs(A             C+8+8int(log(abs(A->C          End          If J          Then             Text(R,C,"X             C+8->C          End          If J=2          Then             Text(R,C,"^^2             C+8->C          End          If J>2          Then             Text(R,C,"^             Text(R,C+8,J             C+16+8int(log(J->C          End       End    End    Text(R,C,") End Lbl 12 Text(120,100,"READY Pause AxesOn:FnOn SetUpEditor Lbl 8 Output(1,1,"```
Firstly, you should enclose your code in
Code:
`[code]code brackets[/code]`
. Secondly, my guess would be that your trying to display characters off the screen, since the CE screen is larger than the normal TI-84+ screen.
Ivoah wrote:
Firstly, you should enclose your code in
Code:
`[code]code brackets[/code]`
. Secondly, my guess would be that your trying to display characters off the screen, since the CE screen is larger than the normal TI-84+ screen.

I'll try that rn, thanks.
Ivoah wrote:
Firstly, you should enclose your code in
Code:
`[code]code brackets[/code]`
. Secondly, my guess would be that your trying to display characters off the screen, since the CE screen is larger than the normal TI-84+ screen.

That didn't fix it but it did make it a bit faster
It is indeed what Ivoah said, the screen of the TI-84+ is smaller. Where the CE have 10 lines on the homescreen, the 84+ only 8 lines. So your code

Code:
```2(D-I+1 If Ans>10 10 Output(Ans,2,"bla```

will return an error if Ans>8, because there are only 8 lines on the homescreen. You could easily change the variables to 8, so it would be

Code:
```2(D-I+1 If Ans>8 8 Output(...```

or even better:

Code:
`min(8,2(D-I+1`

I hope this helps!
Okay, this line will cause an error because of the Ans part, in your code, I see that at that point, Ans=10, however, as stated by Ivoah, on the monochrome 84, you can only display 8 rows of characters with the output command. I haven't read through your whole code (which really should be in code brackets by the way), but if it is possible to make that text show up at row 8 or lower, then you should do that, which should solve the problem. In fact, you should go over it and make sure that you don't output anything over row 8.
Okay thanks I'm so new to coding! But I really enjoy it! I've just been learning by watching my friend and taking apart and putting programs back together. Thanks a million!!!
PT_ wrote:
It is indeed what Ivoah said, the screen of the TI-84+ is smaller. Where the CE have 10 lines on the homescreen, the 84+ only 8 lines. So your code

Code:
```2(D-I+1 If Ans>10 10 Output(Ans,2,"bla```

will return an error if Ans>8, because there are only 8 lines on the homescreen. You could easily change the variables to 8, so it would be

Code:
```2(D-I+1 If Ans>8 8 Output(...```

or even better:

Code:
`min(8,2(D-I+1`

I hope this helps!

You helped me figure that out and I am very thankful! But now I am receiving an error on the 327th line

Code:
`Text(R,C,"X`

I'm sorry to burden you with such simple questions but I would greatly appreciate some more help
Also the graph screen is much smaller. Instead of 264*150, it is now 95*63 pixels, so you need to adjust that coördinates as well
PT_ wrote:
Also the graph screen is much smaller. Instead of 264*150, it is now 95*63 pixels, so you need to adjust that coördinates as well

how would I go about doing that?

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.

»
» All times are UTC - 5 Hours

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Advertisement