Don't have an account? Register now to chat, post, use our tools, and much more.
Online Users
There are 106 users online: 5 members, 78 guests and 23 bots.
Members: gudenau, nsg, Spyro543.
Bots: VoilaBot (2), Magpie Crawler (4), VoilaBot (1), Googlebot (16).
SAX
 » Goto page 1, 2  Next
Author Message
justametrognome

Newbie

Joined: 09 Jun 2007
Posts: 9

 Posted: 09 Jun 2007 09:08:08 pm    Post subject: Err:Label, but why and where? The problem seems to have been solved, thanks to KermMartian. Thank you In my prime factorization program I keep getting an error label (some of the code is attached). I can't figure out what the check syntax option says is wrong, and i don't know enough to identify the error myself. Here's the code: (ₒ means store) :ClrHome :Disp "Prime Factorization" :prgmPQPV :Input "Number=",A :AₒB :ClrHome :If A>0 or A=int(A) :Then :Goto 00 :End :Lbl 00 :If (A/2)=int(A/2) :Then :(Z+1)ₒZ :(A/2)ₒA :Goto 00 :End :If (A/2)≠int(A/2) :Then :Goto 01 :End :Stop :Lbl 01 :If (A/3)=int(A/3) :Then :(Y+1)ₒY :(A/3)ₒA :Goto 01 :End :If (A/3)≠int(A/3) :Then :Goto 02 :End :Stop :Lbl 02 ....It continues like this, just interchange 3 for an appropriate prime and go one letter down in the alphabet for variable.Last edited by justametrognome on 09 Jun 2007 10:31:40 pm; edited 1 time in total
Mexi1010

Power User

Joined: 06 Mar 2007
Posts: 492
Location: Home

 Posted: 09 Jun 2007 09:10:41 pm    Post subject: Err: Label just means you have some kind of a goto command with a lable that does not exist._________________
justametrognome

Newbie

Joined: 09 Jun 2007
Posts: 9

 Posted: 09 Jun 2007 09:11:27 pm    Post subject: I actually checked for that and couldn't find anything...
Mexi1010

Power User

Joined: 06 Mar 2007
Posts: 492
Location: Home

 Posted: 09 Jun 2007 09:12:49 pm    Post subject: When you get the error message there should be two optionis, click the second one and se what it takes you to in the code then post that line._________________
justametrognome

Newbie

Joined: 09 Jun 2007
Posts: 9

 Posted: 09 Jun 2007 09:14:15 pm    Post subject: I didn't get the second option, just an ERR:LABEL And I'm looking through it now in case i managed to miss a label
Pseudoprogrammer

Awesomesauce

Joined: 12 Dec 2006
Posts: 890

 Posted: 09 Jun 2007 09:15:49 pm    Post subject: Double check all of your labels and gotos
justametrognome

Newbie

Joined: 09 Jun 2007
Posts: 9

 Posted: 09 Jun 2007 09:20:47 pm    Post subject: checked again...nothing I could see (keep in mind, most of my programming knowledge has come from experimentation and the nice little explanation that the calculator itself possesses)
Harrierfalcon

Joined: 15 Jan 2007
Posts: 224

 Posted: 09 Jun 2007 09:24:45 pm    Post subject: What's the code for prgmPQPV?_________________I've given up trying to sync all of my sigs at once. Go look at my UTI Profile and make my life easier. Thnx.
Pseudoprogrammer

Awesomesauce

Joined: 12 Dec 2006
Posts: 890

 Posted: 09 Jun 2007 09:25:09 pm    Post subject: Can you PM me the full source?
justametrognome

Newbie

Joined: 09 Jun 2007
Posts: 9

 Posted: 09 Jun 2007 09:29:19 pm    Post subject: prgmPQPV My clearing program. It clears all of my variables. Mainly because I can and so certain programs don't get confused. My calculator is incompatible with any computer I have access to...So all I have is what I've posted. But the primes go up to 83 and then I have various outputs like this: :Output(2,1,"2^" :Output(2,4,Z and then i go down to the 7th row and go over.
Xphoenix

Member

Joined: 25 May 2007
Posts: 126
Location: North of the south pole... or is it south from the south pole...? Or east from the west pole?

 Posted: 09 Jun 2007 09:30:22 pm    Post subject: Remember, ERR:LABEL does not have a goto option, as mentioned in the security section of the BASIC-Dev. Can I also see the source? Defined in the manual, an ERR:LABEL occurs if, and only if, there is no Lbl with a corresponding Goto. Basically, there is a Goto
justametrognome

Newbie

Joined: 09 Jun 2007
Posts: 9

 Posted: 09 Jun 2007 09:33:04 pm    Post subject: No no no, I posted what I have of this program on the computer (which I had to type in). I'm relatively new at programming. I've just checked all of the labels, which I'll do again in about 5 minutes.
c_plus_plus

Newbie

Joined: 19 Jun 2006
Posts: 13

 Posted: 09 Jun 2007 09:38:00 pm    Post subject: I have an Idea. maybe you mistyped one of your labels of goto's I thk you might have mistyped one of you 0's as an O. In case you couldn't tell the first is a zero the second is the letter O.
justametrognome

Newbie

Joined: 09 Jun 2007
Posts: 9

 Posted: 09 Jun 2007 09:54:51 pm    Post subject: looking through yet again...and I didn't switch any O's with 0's. That would mean extra keystrokes... Is it my telling it to Goto X within Lbl X? While I'm here: couldn't I optimize this by getting rid of all of the stop commands and my If (A/prime)doesn't equal int(A/prime) Then Goto next End
KermMartian

Joined: 14 Mar 2005
Posts: 55736
Location: Earth, Sol, Milky Way

 Posted: 09 Jun 2007 10:03:41 pm    Post subject: 1. Use http://sc.cemetech.net to generate code from your programs to post. It's easier for everyone. 2. Never, never ever EVER Goto out of a Then/End structure. It causes memory leaks and slows down your program. 3. Always use Return instead of Stop for compatibility 4. I'm fairly sure massive optimization can be done to that. If no one else beats me to it, I'll optimize it later._________________
justametrognome

Newbie

Joined: 09 Jun 2007
Posts: 9

 Posted: 09 Jun 2007 10:10:11 pm    Post subject: Not using the Goto within the loop doesnt seem to work. Or do I not even need goto's and label's in this at all? My calculator and computer don't currently work together. I'm working on that too. And you need to go and optimize it...I'm doing this to see if I can. I am really a beginning programmer. I don't even know all of the commands or how to use them.
KermMartian

Joined: 14 Mar 2005
Posts: 55736
Location: Earth, Sol, Milky Way

 Posted: 09 Jun 2007 10:24:16 pm    Post subject: Ah, well, that's kinda key. Some random documentation we have here: http://www.cemetech.net/projects/btutor/ http://www.cemetech.net/projects/basicelite/ http://www.ticalc.org/archives/files/fileinfo/369/36993.html Other tutorials: http://tifreakware.net/tutorials/83p/b/_________________
justametrognome

Newbie

Joined: 09 Jun 2007
Posts: 9

 Posted: 09 Jun 2007 10:31:03 pm    Post subject: Wow...it actually works now, thank you for listening and offering help. I'll use those tutorials. Some structured education. That much I can handle. Thank you very much. (it looks like it was too long and a very confused program, now it's slightly less confused)
KermMartian

Joined: 14 Mar 2005
Posts: 55736
Location: Earth, Sol, Milky Way

 Posted: 09 Jun 2007 10:34:06 pm    Post subject: Post the code as you have it now? And please stick around for more help when you have questions; we're happy to assist. _________________
Super Speler

Joined: 12 Dec 2006
Posts: 248

 Posted: 10 Jun 2007 09:49:43 am    Post subject: Oh, and the most complete TI-Basic tutorial site I have yet to come across: TI-Basic Developer
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
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.

»
 » Goto page 1, 2  Next Page 1 of 2 » All times are GMT - 5 Hours

 Jump to: Select a forum Announcements----------------Cemetech AnnouncementsCemetech LabsContests General Discussion----------------Technology & Calculator Open Topic-- Electronics/Hardware Development-- Calculator HardwareYour ProjectsGeneral Open Topic-- Politics & Rants-- Reviews-- Humour/Jokes Cemetech's Projects----------------Doors CSSourceCoderMember Features-- TI-Freak8x-- Merthsoft-- GrammerOther & Upcoming Projects-- The BASIC Elite-- mobileTunes-- CALCnet 2.2-- SuggestionsProgramming the TI-83 Plus/TI-84 PlusUsing the TI-83 Plus/TI-84 PlusWebsite Programming & Design----------------General Programmingz80 AssemblyTI-BASICCasio Prizm/FX Development & ProgrammingWebsite Markup & ScriptingGraphics1337 Programming Tips Building with Blocks----------------FreeBuild, LEGO, and Minecraft-- FreeBuild General-- Suggestions & Troubleshooting-- Content & Gallery-- Servers & Activities
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

© Copyright 2000-2013 Cemetech & Kerm Martian :: Page Execution Time: 0.035952 seconds.