Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
I prefer this to be a BonziCE (And C and Cemetech) thing...
SM84CE wrote:
I prefer this to be a BonziCE (And C and Cemetech) thing...

If BonziCE is to be written in pure TI-Basic, this is impossible.

It would require extensive Assembly subprograms, or even C ones.

It would almost be easier to just write it all in C, but I'd hardly call this an ďeasy first programĒ.

I am actually very excited to see what comes out of this project, if I can offer my services at all, I would!
I'll have to look into possible libraries that I can use. As for this being in C, don't you think it's a problem if you don't know C?? Smile I think I can pull off a BASIC program, maybe with some libraries.
SM84CE wrote:
I'll have to look into possible libraries that I can use. As for this being in C, don't you think it's a problem if you don't know C?? Smile I think I can pull off a BASIC program, maybe with some libraries.


1) There arenít that many other libraries :/
2) C is a great language. I highly recommend learning it at some point, as immensely popular languages like Java, C#, C++, JavaScript, etc, are very similar, because they were all either written in C or written in something written in C.
3) See #1

Mateo and friends ported a very powerful language to a platform greatly in need of it.

Iím learning their port myself (though the learning has taken a short break due to web dev) and I love it. Itís an excellent language.
Looks like I'll be sailing the high C's soon! Ahoy mateys Mateo, me could use some help later!
I've come up to the point where I can detect the Var before the ++/--, but I need to find how to increment or decrement the var.

Will post code soon, accidentally deleted my test prgm, but I still kinda remember the code.


If I were to make an encryption/decryption system for the CE, what characters would you like to see supported? Tokens? Stat Vars? (No lowercase, that messed things up when sending the 8xp file from computer to calc) I'm almost done, just need to get the chars and what number to get what char (1= :, 2= =, etc.)

Also, I need help making a multi page menu (f1 = <<, f5 = >>) More later.

MENU TITLE (large font)

Option 1 (Small)
...


<< page # (Centered) >>
F1 f3 f5

where f1 is the previous page, and f5 is the next page, CLEAR will be used to exit.
For the menu, I have this, but if I were to select option 2 and press ENTER, how would I make it toggle between degrees and radians? How about Float, Fix 0, Fix1, ..., Fix 9 then back to float??
This will be the BonziCE settings menu style

I'd have posted my code that I was testing, but when I connected my calc to TI-Connect ce and deleted a few vars (Y1 and Y2), the RAM unexpectedly reset. This was the latest backup (~.5 hours old)


Code:

2:prgmθFMT
BackgroundOn BLACK //debug, and I wanted to see the text covering stuff

TextColor(BLACK
prgmCLR0VAR
2→P
ClrDraw
Text(150,0,"<<                                                                                                                    >>
length("Page "+toString(P→A            //centers the page # (ish)
264/2→B
Text(150,B-3A,"Page "+toString(P
TextColor(NAVY //should have been Magenta, but oh well, non-official...
Text(≠1,0,0,"BonziBuddyCE //Title
TextColor(MAGENTA
Text(30,10,"Option 01
Text(44,10,"Option 02
Text(58,10,"Option 03
Text(72,10,"Option 04

TextColor(NAVY
30→Y
Repeat K=21 or K=45
Text(16,0,"
Text(Y,0,">
Text(Y+14,0,"   
Text(Y-14,0,"   
getKey→K
If K=25
Y-14→Y
If K=34
Y+14→Y
If Y=86
Y-14→Y
If Y=16
Y+14→Y
End
Goto A
//below code from jonbush in SAX, stored just in case
"Repeat [quit condition]:[update stuff here]:getKey→K:If K:Then:[key handling stuff]:End:End
Lbl A //quit routines
1:prgmθFMT
ClrHome
prgmCLR0VAR
Errm...

That has a few lot of optimizations that can be made.

Most obvious is the following:

Code:
If K=25
Y-14→Y
If K=34
Y+14→Y
If Y=86
Y-14→Y
If Y=16
Y+14→Y


vv


Code:
Y+14((K=25)+(K=16))-14((K=34)+(K=86→Y


Even that could probably be optimized.

Itís much, much faster.
_iPhoenix_ wrote:
Errm...

That has a few lot of optimizations that can be made.

Most obvious is the following:

Code:
If K=25
Y-14→Y
If K=34
Y+14→Y
If Y=86
Y-14→Y
If Y=16
Y+14→Y


vv


Code:
Y+14((K=25)+(K=16))-14((K=34)+(K=86→Y


Even that could probably be optimized.

Itís much, much faster.


I don't see how that works, other that the (K=25) being 1 because of Boolean logic, and the above, un-optimized stuff makes more sense to me (now)...

Also, what about the Fix-Float changing thing? How would that be implemented?
This is my starting point for BonziCE: make a settings menu first, then build the other stuff
I came up with a way to check if you are in fix n/float (from our discussion in SAX, I interpreted that you were looking for this):

This only works if you are in Normal, not Sci or Eng. (IIRC)


Code:
1->B
For(A,1,10
expr(toString(10^(~A
If B(Ans!=10^(~A
Then
DelVar BIf A=10
Then
Disp "Float
Else
Disp "Fix "+toString(A-1
End
End
End
Great! I'll just need to modify this so that it can save the selected fix/float setting to a list, and for it to not use real vars (var support for calculations), and to make it work in the graphscreen menu (that should be relatively easy)
What about this?

Code:
max(0,~2+length(toString(fPart(π

Returns 0-9 or 10 if float mode Smile
PT_, that actually does what I want it to do, no converting required, _iPhoenix_ 's routine could be used for text-based stuff. Thanks, guys! I'm at school now, so I'll details back to you all later

Here's how I think a Degree/Radian detector would look like:

Code:
length(toString(tan(45->ʟMENU2(5 //This is my 'save' list for the menu test program that I'm using
If ʟMENU2(5)=1
Then
Text(Y,10,"Degree  //Y is the Y location of the cursor, can be any # [i]here[/i]
Degree //For safety
End
If ʟMENU2(5)>1 //tan(45^^r)~=1.6
Then
Text(Y,10,"Radian
Radian //safety
End


Here's how it should look like: (Thanks, PT_!)

Code:
sin(pi->SAVELIST(1
If sin(pi
Text(Y,10,"Degree
Degree
Else
Text(Y,10,"Radian
Radian
End


Restore Fix-n or Float from save list

Code:
FIXRECOVER
If ʟSAVE(1)!=10
Fix ʟSAVE(1)
If ʟSAVE(1)=10
Float
Sorry for the double post -- this needs to be separate:

I finished a toggle style menu on the graphscreen, Option 2 in the following code switches from Degrees <> Radians AFTER exiting the prgm. Use the Left/Right keys. Option 1: Press ENTER to change the text, this isn't really a toggle. The other options are there so that I can see how much real estate I have available.

FIXED!! SEE BELOW


This has only one problem: When you select the Radians option, then scroll up or down, the "Radians" text is copied to the other lines (but is replaced when another option is selected, the options that do nothing aren't "fixed"). I don't know why this is happening and want some with this, if anyone can fix this.


Code:
PROGRAM: TOGGLE
SetUpEditor TGL
10->dim(|LTGL
2:prgmthetaFMT
TextColor(Black
prgmCLR0VAR
1->|LTGL(1)
ClrDraw
Text(150,0,"<<                                                                                                                    >>
length("Page "+toString(|LTGL((1)->|LTGL((2)
264/2->|LTGL((3)

"Page "+toString(|LMENU2(1))+"   "->Str1
Text(150,(|LTGL(3)-3|LMENU2(2)),Str1
TextColor(Magenta
Text(~1,0,0,"BonziBuddyCE menu test
TextColor(Red
Text(28,10,"Option 01
Text(42,10,"Option 02
Text(56,10,"Option 03
Text(70,10,"Option 04
Text(84,10,"Option 05
Text(98,10,"Option 06
Text(112,10,"Option 07
TextColor(Black
Text(136,10,"Press [CLEAR] to quit

28->|LTGL(4
While 0
   "Y
   
   " 1=Page #
   " 2=length('Page'+pg#
   " 3=mid pt of graph, 264/2
   " 4=Y-value of cursor
   " 5= K val For(getKey
   " 6=random color
   " 7=toggle menu counter 1
End

1->|LTGL(7)
Repeat |LTGL(5)=45
   TextColor(Black
   "Page "+toString(|LTGL(1))+"   "->Str1
   Text(150,(|LTGL(3)-3|LTGL(2)),Str1
   Text(14,0,"
   Text(|LTGL(4),0,">
   Text(|LTGL(4)+14,0,"   
   Text(|LTGL(4)-14,0,"   
   getKey->|LTGL(5
   If |LTGL(5)=25
   |LTGL(4)-14->|LTGL(4
   If |LTGL(5)=34
   |LTGL(4)+14->|LTGL(4
   If |LTGL(4)=126
   |LTGL(4)-14->|LTGL(4
   If |LTGL(4)=14
   |LTGL(4)+14->|LTGL(4
   If |LTGL(4)=28 and |LTGL(5)=105
   Then
      Repeat |LTGL(6)!=White
         randInt(Blue,DarkGray->|LTGL(6)
      End
      TextColor(|LTGL(6)
      Text(|LTGL(4),10,"Testing Option...
   End
   If |LTGL(4)=42 and |LTGL(5)=26 and |LTGL(7)=1 or |LTGL(7)=2
   Then
      TextColor(Magenta
      Text(|LTGL(4),10,"Radian         
      2->|LTGL(7)
   End
   If |LTGL(4)=42 and |LTGL(5)=24 and (|LTGL(7)=2 or |LTGL(7)=1)
   Then
      TextColor(Red
      Text(|LTGL(4),10,"Degree       
      1->|LTGL(7)
   End
   
   
   
   
   
   
   If |LTGL(5)=11 and |LTGL(1)!=1
   |LTGL(1)-1->|LTGL(1)
   If |LTGL(5)=15
   |LTGL(1)+1->|LTGL(1)
End

If |LTGL(7)=1
Then:Degree
   Else:Radian
End

While 0
   "Repeat [quit condition]:[update stuff here]:getKey>>K:If K:Then:[key handling stuff]:End:End
End

1:prgmthetaFMT
ClrHome
prgmCLR0VAR



Feel Free to replace the subprograms, or get them; they're in 84pce/basic/programs, look for The Programmer's Toolbox Sorry for the self-advertising
Here's the code, the list elements and values are detailed below, this could be optimized, but this is a beta-stage menu for BonziCE.


Code:
PROGRAM: TOGGLE
SetUpEditor TGL
20->dim(|LTGL
2:prgmthetaFMT
TextColor(Black
prgmCLR0VAR
1->|LTGL(1)
ClrDraw
Text(150,0,"<<                                                                                                                    >>
length("Page "+toString(|LTGL((1)->|LTGL((2)
264/2->|LTGL((3)

"Page "+toString(|LTGL(1))+"   "->Str1
Text(150,(|LTGL(3)-3|LTGL(2)),Str1
TextColor(Magenta
Text(~1,0,0,"Toggle menu test
TextColor(Red
Text(28,10,"Option 01
Text(42,10,"Option 02
Text(56,10,"Option 03
Text(70,10,"Option 04
Text(84,10,"Option 05
Text(98,10,"Option 06
Text(112,10,"Option 07
TextColor(Black
Text(136,10,"Press [CLEAR] to quit

28->|LTGL(4
While 0
   " 1=Page #
   " 2=length('Page'+pg#
   " 3=mid pt of graph, 264/2
   " 4=Y-value of cursor
   " 5= K val For(getKey
   " 6=random color
   " 7=TM Count 1
   " 8=TM Count 2
   " 9=Fix settings, 10=Float
End

1->|LTGL(7)
Repeat |LTGL(5)=45
   TextColor(Black
   "Page "+toString(|LTGL(1))+"   "->Str1
   Text(150,(|LTGL(3)-3|LTGL(2)),Str1
   Text(14,0,"
   Text(|LTGL(4),0,">
   Text(|LTGL(4)+14,0,"   
   Text(|LTGL(4)-14,0,"   
   getKey->|LTGL(5
   If |LTGL(5)=25
   |LTGL(4)-14->|LTGL(4
   If |LTGL(5)=34
   |LTGL(4)+14->|LTGL(4
   If |LTGL(4)=126
   |LTGL(4)-14->|LTGL(4
   If |LTGL(4)=14
   |LTGL(4)+14->|LTGL(4
   If |LTGL(4)=28 and |LTGL(5)=105
   Then
      Repeat |LTGL(6)!=White
         randInt(Blue,DarkGray->|LTGL(6)
      End
      TextColor(|LTGL(6)
      Text(|LTGL(4),10,"Testing Option...
   End
   
   If |LTGL(4)=42 and |LTGL(5)=105 and |LTGL(7)=1
   //or |LTGL(7)=2
   Then
      TextColor(Magenta
      Text(|LTGL(4),10,"Radian           
      2->|LTGL(7)
      0->|LTGL(5) //flush getKey
   End
   If |LTGL(4)=42 and |LTGL(5)=105 and |LTGL(7)=2
   //or |LTGL(7)=1)
   Then
      TextColor(Red
      Text(|LTGL(4),10,"Degree         
      1->|LTGL(7)
      0->|LTGL(5) //flush getKey
   End

   //Fix menu -- UNIMPLEMENTED
   //If |LTGL(4)=56 and |LTGL(5)=26 and |LTGL(8)=1 or |LTGL(8)=2
   //Then
   //   TextColor(Magenta
   //   Text(|LTGL(4),10,"Float
   //   2->|LTGL(8)
   //End
   //If |LTGL(4)=56 and |LTGL(5)=24 and (|LTGL(8)=2 or |LTGL(8)=1)
   //Then
   //   TextColor(Red
   //   Text(|LTGL(4),10,"Fix "+toString(|LTGL(9)     
   //   1->|LTGL(8)
   //End
   
   
   
   
   
   
   If |LTGL(5)=11 and |LTGL(1)!=1
   |LTGL(1)-1->|LTGL(1)
   If |LTGL(5)=15
   |LTGL(1)+1->|LTGL(1)
End

If |LTGL(7)=1
Then:Degree
   Else:Radian
End

1:prgmthetaFMT
ClrHome
prgmCLR0VAR


Happy Veteran's day!
SM84CE wrote:
Here's the code, the list elements and values are detailed below, this could be optimized, but this is a beta-stage menu for BonziCE.


Code:
PROGRAM: TOGGLE
SetUpEditor TGL
20->dim(|LTGL
2:prgmthetaFMT
TextColor(Black
prgmCLR0VAR
1->|LTGL(1)
ClrDraw
Text(150,0,"<<                                                                                                                    >>
length("Page "+toString(|LTGL((1)->|LTGL((2)
264/2->|LTGL((3)

"Page "+toString(|LTGL(1))+"   "->Str1
Text(150,(|LTGL(3)-3|LTGL(2)),Str1
TextColor(Magenta
Text(~1,0,0,"Toggle menu test
TextColor(Red
Text(28,10,"Option 01
Text(42,10,"Option 02
Text(56,10,"Option 03
Text(70,10,"Option 04
Text(84,10,"Option 05
Text(98,10,"Option 06
Text(112,10,"Option 07
TextColor(Black
Text(136,10,"Press [CLEAR] to quit

28->|LTGL(4
While 0
   " 1=Page #
   " 2=length('Page'+pg#
   " 3=mid pt of graph, 264/2
   " 4=Y-value of cursor
   " 5= K val For(getKey
   " 6=random color
   " 7=TM Count 1
   " 8=TM Count 2
   " 9=Fix settings, 10=Float
End

1->|LTGL(7)
Repeat |LTGL(5)=45
   TextColor(Black
   "Page "+toString(|LTGL(1))+"   "->Str1
   Text(150,(|LTGL(3)-3|LTGL(2)),Str1
   Text(14,0,"
   Text(|LTGL(4),0,">
   Text(|LTGL(4)+14,0,"   
   Text(|LTGL(4)-14,0,"   
   getKey->|LTGL(5
   If |LTGL(5)=25
   |LTGL(4)-14->|LTGL(4
   If |LTGL(5)=34
   |LTGL(4)+14->|LTGL(4
   If |LTGL(4)=126
   |LTGL(4)-14->|LTGL(4
   If |LTGL(4)=14
   |LTGL(4)+14->|LTGL(4
   If |LTGL(4)=28 and |LTGL(5)=105
   Then
      Repeat |LTGL(6)!=White
         randInt(Blue,DarkGray->|LTGL(6)
      End
      TextColor(|LTGL(6)
      Text(|LTGL(4),10,"Testing Option...
   End
   
   If |LTGL(4)=42 and |LTGL(5)=105 and |LTGL(7)=1
   //or |LTGL(7)=2
   Then
      TextColor(Magenta
      Text(|LTGL(4),10,"Radian           
      2->|LTGL(7)
      0->|LTGL(5) //flush getKey
   End
   If |LTGL(4)=42 and |LTGL(5)=105 and |LTGL(7)=2
   //or |LTGL(7)=1)
   Then
      TextColor(Red
      Text(|LTGL(4),10,"Degree         
      1->|LTGL(7)
      0->|LTGL(5) //flush getKey
   End

   //Fix menu -- UNIMPLEMENTED
   //If |LTGL(4)=56 and |LTGL(5)=26 and |LTGL(8)=1 or |LTGL(8)=2
   //Then
   //   TextColor(Magenta
   //   Text(|LTGL(4),10,"Float
   //   2->|LTGL(8)
   //End
   //If |LTGL(4)=56 and |LTGL(5)=24 and (|LTGL(8)=2 or |LTGL(8)=1)
   //Then
   //   TextColor(Red
   //   Text(|LTGL(4),10,"Fix "+toString(|LTGL(9)     
   //   1->|LTGL(8)
   //End
   
   
   
   
   
   
   If |LTGL(5)=11 and |LTGL(1)!=1
   |LTGL(1)-1->|LTGL(1)
   If |LTGL(5)=15
   |LTGL(1)+1->|LTGL(1)
End

If |LTGL(7)=1
Then:Degree
   Else:Radian
End

1:prgmthetaFMT
ClrHome
prgmCLR0VAR


Happy Veteran's day!


Hereís that code without dependencies on the toolbox, courtesy of my site Wink


Code:

SetUpEditor TGL
20->dim(|LTGL
GridOff:AxesOff:BorderColor 4
TextColor(Black
DelVar ADelVar BDelVar CDelVar DDelVar EDelVar FDelVar GDelVar HDelVar IDelVar JDelVar KDelVar LDelVar MDelVar NDelVar ODelVar QDelVar RDelVar SDelVar TDelVar UDelVar VDelVar WDelVar XDelVar YDelVar ZDelVar PDelVar theta
1->|LTGL(1)
ClrDraw
Text(150,0,"<<                                                                                                                    >>
length("Page "+toString(|LTGL((1->|LTGL((2)
264/2->|LTGL((3)

"Page "+toString(|LTGL(1))+"   ->Str1
Text(150,(|LTGL(3)-3|LTGL(2)),Str1
TextColor(Magenta
Text(~1,0,0,"Toggle menu test
TextColor(Red
Text(28,10,"Option 01
Text(42,10,"Option 02
Text(56,10,"Option 03
Text(70,10,"Option 04
Text(84,10,"Option 05
Text(98,10,"Option 06
Text(112,10,"Option 07
TextColor(Black
Text(136,10,"Press [CLEAR] to quit

28->|LTGL(4
While 0
   " 1=Page #
   " 2=length('Page'+pg#
   " 3=mid pt of graph, 264/2
   " 4=Y-value of cursor
   " 5= K val For(getKey
   " 6=random color
   " 7=TM Count 1
   " 8=TM Count 2
   " 9=Fix settings, 10=Float
End

1->|LTGL(7)
Repeat |LTGL(5)=45
   TextColor(Black
   "Page "+toString(|LTGL(1))+"   ->Str1
   Text(150,(|LTGL(3)-3|LTGL(2)),Str1
   Text(14,0,"
   Text(|LTGL(4),0,">
   Text(|LTGL(4)+14,0,"   
   Text(|LTGL(4)-14,0,"   
   getKey->|LTGL(5
   If |LTGL(5)=25
   |LTGL(4)-14->|LTGL(4
   If |LTGL(5)=34
   |LTGL(4)+14->|LTGL(4
   If |LTGL(4)=126
   |LTGL(4)-14->|LTGL(4
   If |LTGL(4)=14
   |LTGL(4)+14->|LTGL(4
   If |LTGL(4)=28 and |LTGL(5)=105
   Then
      Repeat |LTGL(6)!=White
         randInt(Blue,DarkGray->|LTGL(6)
      End
      TextColor(|LTGL(6)
      Text(|LTGL(4),10,"Testing Option...
   End
   
   If |LTGL(4)=42 and |LTGL(5)=105 and |LTGL(7)=1
   //or |LTGL(7)=2
   Then
      TextColor(Magenta
      Text(|LTGL(4),10,"Radian           
      2->|LTGL(7)
      0->|LTGL(5) //flush getKey
   End
   If |LTGL(4)=42 and |LTGL(5)=105 and |LTGL(7)=2
   //or |LTGL(7)=1)
   Then
      TextColor(Red
      Text(|LTGL(4),10,"Degree         
      1->|LTGL(7)
      0->|LTGL(5) //flush getKey
   End

   //Fix menu -- UNIMPLEMENTED
   //If |LTGL(4)=56 and |LTGL(5)=26 and |LTGL(8)=1 or |LTGL(8)=2
   //Then
   //   TextColor(Magenta
   //   Text(|LTGL(4),10,"Float
   //   2->|LTGL(8)
   //End
   //If |LTGL(4)=56 and |LTGL(5)=24 and (|LTGL(8)=2 or |LTGL(8)=1)
   //Then
   //   TextColor(Red
   //   Text(|LTGL(4),10,"Fix "+toString(|LTGL(9)     
   //   1->|LTGL(8)
   //End
   
   
   
   
   
   
   If |LTGL(5)=11 and |LTGL(1)!=1
   |LTGL(1)-1->|LTGL(1)
   If |LTGL(5)=15
   |LTGL(1)+1->|LTGL(1)
End

If |LTGL(7)=1
Then:Degree
   Else:Radian
End

RectGC:CoordOn:GridOff:AxesOn Black:LabelOff:ExprOn:BorderColor 1:DetectAsymOn
ClrHome
DelVar ADelVar BDelVar CDelVar DDelVar EDelVar FDelVar GDelVar HDelVar IDelVar JDelVar KDelVar LDelVar MDelVar NDelVar ODelVar QDelVar RDelVar SDelVar TDelVar UDelVar VDelVar WDelVar XDelVar YDelVar ZDelVar PDelVar theta
Here's a quick to do/ done list:
**Take a look at the to-do, feel free to put your opinions below!**

Key
Done
To-Do

Loading the program
Exiting
Loading/ saving of vars (A-Z, θ)
Help screen with implemented commands and credits
Settings menu
Var setup (A-Z, θ)
Clearing the vars in-program
Eval of basic math, trig, etc
Create/ set up the save list

Draw the Bonzi monkey on-screen during loading of the program

Operations counter

adware
jokes (I have ~12 so far)

Saving/ loading of settings from the settings screen

Graphing functions (what types should I support?)

++ and -- routines (for extra credit Smile )

APD in program
Adjust contrast in program (via use of an asm prgm)

maybe the quit joke thing suggested by TLM (page 1 of this thread, iirc)

Any thing else that you guys suggest and I deem to be doable
(I'll edit this as time goes on and provided that I don't forget about this)
SM84CE (twice) wrote:
@TLM, did you seen my thread?

no

***TheLastMillennial runs
If you want to highlight me, you have to type in "TheL" or more characters, TLM isn't in my name and therefore wont highlight me. Wink

For your jokes, these are some of my favorite from looking around the web (I edited a few of them):
1.How many programmers does it take to change a light bulb?
None. It's a hardware problem.

2. Why is it that programmers always confuse Halloween with Christmas?
Because 31 OCT = 25 DEC

3. Why do Java developers wear glasses?
Because they can't C#

4. Two bytes meet. The first byte asks, "Are you ill?"
The second byte replies, "No, just feeling a bit off."

5. "Knock, knock. Who's there?"
very long pause...
"a Color Silver Edition."

6. If you put a million monkeys on a million CEs,
one of them will eventually write an ASM program. The rest of them will write BASIC programs.

7. There's a band called 1023MB. They haven't had any gigs yet.

8. There are two kinds of people in the world: those who can extrapolate from incomplete data.

9. The programmer's wife tells him: "Goto the store and pick up a loaf of bread. If they have eggs, get a dozen." The programmer comes home with 12 loaves of bread.

10. What will a computer technician do when his car is not working?
He will close all the windows of his car

11. What do you call a singing laptop?
A Dell
What song?
Windows Hello

12. How do two programmers make money?
One writes viruses, the other anti-viruses
Well, those are good!

If you have an opinion on any of the red features (To-Do), post below. I'd especially want opinions on the APD feature.

Also, what types of functions should BonziCE be able to graph?

Loading Bar Poll: This may be closed soon, hurry to get your vote in if you have not!
SM84CE wrote:
Could this be implemented in TI-BASIC? If so, how?


Code:

VAR++ -> VAR+1
A++ -> A+1
2++ -> 3

VAR-- -> VAR-1
A-- -> A-1
2-- -> 1

I'd appreciate your help on this, and am in no hurry. For more reference, See my thread.

Thanks,
SM84CE
After a few seconds I realized that you were talking about text replacement, probably in a string. The most basic answer is to combine inString(), sub(), and + to do the replacement you need; in practice, it gets a little harder, because in an ideal world you'd be using a lexer or at worst regex to figure this out. For example, in regex, s/([A-Z]+)--/\1-1/g would serve for all the variable decrement replacements, and you'd want to do constant simplification with something where you replaced (constant)-- with actual number (constant-1). If you're not familiar with using inString(), sub(), and +, I'd be happy to show you some examples for simple replacement. Here, you'd want to use inString to find "--" and "++", then work backwards to figure out the constant or variable name immediately preceding it (ie, check if the character you grab with sub() 1 character before, 2 characters before, etc is a letter or a digit, until you get a non letter-or-digit).
  
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
Page 3 of 4
» All times are GMT - 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