-->
[TI-83+ BASIC] routine help
-->
-->
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
-->
Home
About
Team
Rules
Stats
Status
Sitemap
Chat
Downloads
Forum
News
Our Projects
Major Community Projects
Recent Posts
Unread Posts
Replies
Tools
SourceCoder3
Other Things...
Omnimaga Radio
TI-83 Plus ASM File Unsquisher
Z80 Conversion Tools
IES TI File Editor
Free RAM areas
Comprehensive Getkeyr table
URL Shortener
Online Axe Tilemap Editor
Help
Contact Us
Change Request
Report Issue/Bug
Team
Articles
Members
View the memberlist
Search For Members
Buddies
Login
Register
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
TI-BASIC
»
[TI-83+ BASIC] routine help
« previous
next »
Print
Pages: [
1
]
2
Go Down
Author
Topic: [TI-83+ BASIC] routine help (Read 8033 times)
0 Members and 1 Guest are viewing this topic.
Halifax
LV9
Veteran (Next: 1337)
Posts: 1334
Rating: +2/-1
[TI-83+ BASIC] routine help
«
on:
September 12, 2006, 11:38:00 am »
I need help because this routine doesn't work i need a routine the returns zero if C or D or E or F not equal to zero and return zero if G!=8 or 80 or H!=8 or 48. Heres my code that doesnt work. I need it to return one only when both are right
(((G=8 or G=80) or (H=8 or H=48)) and (C or D or E or F=12))
Logged
There are 10 types of people in this world-- those that can read binary, and those that can't.
kalan_vod
LV11
Super Veteran (Next: 3000)
Posts: 2715
Rating: +10/-0
[TI-83+ BASIC] routine help
«
Reply #1 on:
September 12, 2006, 08:11:00 pm »
QuoteBegin-Killerplayer+12 Sep, 2006, 17:38-->
QUOTE
(Killerplayer @ 12 Sep, 2006, 17:38)
I need help because this routine doesn't work i need a routine the returns zero if C or D or E or F not equal to zero and return zero if G!=8 or 80 or H!=8 or 48. Heres my code that doesnt work. I need it to return one only when both are right
(((G=8 or G=80) or (H=8 or H=48)) and (C or D or E or F=12))
0 if c or d or e or f !=0
0 if g!=8 or 80 or H!=8 or 48
I thought you posted this in your Glatic thread, but I thought it over and found a simple solution:
c1
-->
CODE
ec1(G=8 or G=80 or H=8 or H=48) and max(0={C,D,E,Fc2
ec2
Logged
Halifax
LV9
Veteran (Next: 1337)
Posts: 1334
Rating: +2/-1
[TI-83+ BASIC] routine help
«
Reply #2 on:
September 13, 2006, 11:09:00 am »
o sweet thanks and yes i did but no one answered
Logged
There are 10 types of people in this world-- those that can read binary, and those that can't.
kalan_vod
LV11
Super Veteran (Next: 3000)
Posts: 2715
Rating: +10/-0
[TI-83+ BASIC] routine help
«
Reply #3 on:
September 13, 2006, 11:26:00 am »
QuoteBegin-Killerplayer+13 Sep, 2006, 17:09-->
QUOTE
(Killerplayer @ 13 Sep, 2006, 17:09)
o sweet thanks and yes i did but no one answered
I was going to back then, but couldn't figure it out...the way you said it seems odd, but I got it now
.
Logged
DJ Omnimaga
Clacualters are teh gr33t
CoT Emeritus
LV15
Omnimagician (Next: --)
Posts: 55943
Rating: +3154/-232
CodeWalrus founder & retired Omnimaga founder
[TI-83+ BASIC] routine help
«
Reply #4 on:
September 13, 2006, 02:25:00 pm »
sometimes i think asking help in your project thread is a bad idea since all ppl care about is the game progress and screenies
Logged
Halifax
LV9
Veteran (Next: 1337)
Posts: 1334
Rating: +2/-1
[TI-83+ BASIC] routine help
«
Reply #5 on:
October 14, 2006, 07:03:00 am »
Dies anyone know how you can type If Str1="A" or "B" without iit saying a syntax error occured
Logged
There are 10 types of people in this world-- those that can read binary, and those that can't.
Spellshaper
LV10
31337 u53r (Next: 2000)
Posts: 1690
Rating: +0/-0
This is me. Or maybe not.
[TI-83+ BASIC] routine help
«
Reply #6 on:
October 14, 2006, 08:10:00 am »
how about:
If Str1="A" or Str1="B
Logged
Halifax
LV9
Veteran (Next: 1337)
Posts: 1334
Rating: +2/-1
[TI-83+ BASIC] routine help
«
Reply #7 on:
October 14, 2006, 02:59:00 pm »
yea I knew of that way but I'm rele going to be doing it for about 50 chars(i should have told you that) so that would take up mucho space
Logged
There are 10 types of people in this world-- those that can read binary, and those that can't.
kalan_vod
LV11
Super Veteran (Next: 3000)
Posts: 2715
Rating: +10/-0
[TI-83+ BASIC] routine help
«
Reply #8 on:
October 14, 2006, 05:20:00 pm »
Well if you are looking for speed vs. size, that would be the fastest. Now if you want size vs. speed, then you could do this:
c1-->
CODE
ec1DelVar XRepeat Ans
X+1->X
inString("AB..etc",Str1,X
Endc2
ec2
Amazingly it is even faster >.>, or at least not any bit noticable..Go with the code I posted, it is just as fast (if not faster) and smaller.
Logged
Halifax
LV9
Veteran (Next: 1337)
Posts: 1334
Rating: +2/-1
[TI-83+ BASIC] routine help
«
Reply #9 on:
October 15, 2006, 04:20:00 am »
I don't follow that cause I actualy need something like
If Str1="A" or "B" or "C" or "D" or "E" or "F" or ...:Then
code
End
Logged
There are 10 types of people in this world-- those that can read binary, and those that can't.
Radical Pi
LV9
Veteran (Next: 1337)
Posts: 1143
Rating: +5/-2
[TI-83+ BASIC] routine help
«
Reply #10 on:
October 15, 2006, 04:26:00 am »
If inString(Str1,"A B C D E F"
Then
XXX
End
Separate the A's and B's with spaces.
Logged
One of these days I'll get a sig I'm really proud of.
kalan_vod
LV11
Super Veteran (Next: 3000)
Posts: 2715
Rating: +10/-0
[TI-83+ BASIC] routine help
«
Reply #11 on:
October 15, 2006, 07:29:00 am »
c1-->
CODE
ec1DelVar XRepeat Ans or X=26;If inString works or it reaches the end quit loop
X+1->X;advance the pointer
inString("ABCDEFGHIJKLMNOPQRSTUVWXYZ",Str1,X->O;testing, store into O
End;hope you know this
If O:then;if inString contain what Str1 did, then excute this code. if it didnt find it, it continues onward
...
End
c2
ec2
This will work, try it for yourself.
Logged
Halifax
LV9
Veteran (Next: 1337)
Posts: 1334
Rating: +2/-1
[TI-83+ BASIC] routine help
«
Reply #12 on:
October 15, 2006, 09:08:00 am »
kk thanks kalan_vod
Logged
There are 10 types of people in this world-- those that can read binary, and those that can't.
kalan_vod
LV11
Super Veteran (Next: 3000)
Posts: 2715
Rating: +10/-0
[TI-83+ BASIC] routine help
«
Reply #13 on:
October 15, 2006, 11:57:00 am »
QuoteBegin-Killerplayer+15 Oct, 2006, 15:08-->
QUOTE
(Killerplayer @ 15 Oct, 2006, 15:08)
kk thanks kalan_vod
Np, if you don't understand any of it let me know as I know it is difficult to understand others code. Also, this is rather interesting as it would help me also
. Strings are faster as we all know, but seeing this it makes it prove it (if you did the same thing but with a list).
Logged
burr
Guest
[TI-83+ BASIC] routine help
«
Reply #14 on:
October 16, 2006, 06:07:00 am »
QuoteBegin-kalan_vod+13 Sep, 2006, 2:11-->
QUOTE
(kalan_vod @ 13 Sep, 2006, 2:11)
c1-->
CODE
ec1(G=8 or G=80 or H=8 or H=48) and max(0={C,D,E,Fc2
ec2
You did a good job optimizing, but you forgot to do some
http://tibasicdev.wikidot.com/optimize
. I'm surprised PiMan didn't say anything, because I know he knows them
c1
-->
CODE
ec1(36=abs(G-44) or 20=abs(H-28))max(0={C,D,E,Fc2
ec2
Logged
Print
Pages: [
1
]
2
Go Up
« previous
next »
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
TI-BASIC
»
[TI-83+ BASIC] routine help
\n\t\t\t\t\t\t\t\t\t
<' + '/div>\n\t\t\t\t\t\t\t\t\t
%body%<' + '/textarea>
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
Max characters: 20000; characters remaining:
...<' + '/span><' + '/span>
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t<' + '/div>\n\t\t\t\t\t\t\t\t<' + '/div>', sTemplateSubjectEdit: '
', sTemplateBodyNormal: '%body%', sTemplateSubjectNormal: '
%subject%<' + '/a>', sTemplateTopSubject: 'Topic: %subject% (Read 8033 times)', sErrorBorderStyle: '1px solid red' }); aJumpTo[aJumpTo.length] = new JumpTo({ sContainerId: "display_jump_to", sJumpToTemplate: "
Jump to:<" + "/label> %dropdown_list%", iCurBoardId: 70, iCurBoardChildLevel: 1, sCurBoardName: "TI-BASIC", sBoardChildLevelIndicator: "==", sBoardPrefix: "=> ", sCatSeparator: "-----------------------------", sCatPrefix: "", sGoButtonLabel: "go" }); aIconLists[aIconLists.length] = new IconList({ sBackReference: "aIconLists[" + aIconLists.length + "]", sIconIdPrefix: "msg_icon_", sScriptUrl: smf_scripturl, bShowModify: true, iBoardId: 70, iTopicId: 1593, sSessionId: "db06a01f0a023bc3e5488c28441c5590", sSessionVar: "a98404a", sLabelIconList: "Message Icon", sBoxBackground: "transparent", sBoxBackgroundHover: "#ffffff", iBoxBorderWidthHover: 1, sBoxBorderColorHover: "#adadad" , sContainerBackground: "#ffffff", sContainerBorder: "1px solid #adadad", sItemBorder: "1px solid #ffffff", sItemBorderHover: "1px dotted gray", sItemBackground: "transparent", sItemBackgroundHover: "#e0e0f0" }); } function tick2() { if (typeof(document.forms.quickModForm) != "undefined") { calcCharLeft2(); setTimeout("tick2()", 1000); } else setTimeout("tick2()", 800); } function message_onkeyup() { if (typeof(document.forms.quickModForm) != "undefined" && typeof(document.forms.quickModForm.message) != "undefined") { document.forms.quickModForm.message.onkeyup = function onkeyup(event) { storeCaret(this); calcCharLeft2(); }; } else setTimeout("message_onkeyup()", 800); } message_onkeyup(); function calcCharLeft2() { var maxLength = 20000; var oldEditor = "", currentEditor = document.forms.quickModForm.message.value; if (!document.getElementById("editorLeft2")) return; if (oldEditor != currentEditor) { oldEditor = currentEditor; if (currentEditor.replace(/\r/, "").length > maxLength) document.forms.quickModForm.message.value = currentEditor.replace(/\r/, "").substring(0, maxLength); currentEditor = document.forms.quickModForm.message.value.replace(/\r/, ""); } setInnerHTML(document.getElementById("editorLeft2"), maxLength - currentEditor.length); } // ]]>-->