   What is the goto operator and how do you use it?
  I''ve been wondering for awile what the ''goto'' operator is and what it is used for??? I thought this would be the best place to get an answer.Is it something like a loop except it goes to a line of code???thanks in advance. 
  Goto jumps to specified instruction. It''s not advisable to use it, because it makes your code hard to follow (usually).Instead, use functions... ;  How do you actually use it???;  You need to specify the programming language you are using. In C/C++ using goto is bad.. m''kay? In basic it''s used commonly. Can''t answer your question, please be a bit more specific.Vikke Matikainen ;  In basic it''s ''bad'' too.  My mom got a C on an assignment in VB cause i helped her and used a goto statement in some of her code. The instructor suggested gosubOf course, the next day i was searching MSN and saw an article claiming gosub causes crashes...  Wish i still had a link to it, i suspect i''m going to need it when college starts next month. ;  Humm.. yeah, you should use gosub in basic for functions, but what about loops and stuff like that? I can't actually remember are there some instructions for those in basic..But you where asking how to use goto.. I'm not sure but it was like: 10: print "Hello world"20: goto 10 or something like that.Vikke Matikainen   [edited by - kosmo on July 31, 2003 5:57:22 AM];  In languages like C and Pascal you don´t use goto at all. The command is a relict of older languages like good old C64-Basic that allowed only one command after an if-then-statement (as far as I remember).The only reason to use jumps (=goto) I can imagine right now is when doing assembler. Lot of people will tell you gotos are the evil plan of the devil to corrupt good programs. Don´t believe in that. If you find good use for a goto then use it but I think you´ll miss nothing when not using them. ;  Well in C++ you use goto when you try to mimic something that higher level languages do naturally, like getting out of the loop right way, but only when contuniue/break aren't good enough. I think those are explained in "The C++ Programming Language"Another problem, is that if you make a goto loop, then you can only get out of it with another goto and then you are in a witchring.   [edited by - Captain Goatse on July 31, 2003 6:32:12 AM];   Few people seem to like goto...    But to actually ANSWER your question:  goto 4;// random code here  lbl 4;  Something like that =) ;  You do it like this in Visual Basic:label:goto labelLike this in C and C++:label:goto label;Like this in x86 ASM:label:JMP label   "For crying out loud, she has fishes coming out of her head on either side. How can you find this hot?!""If anyone sees a suspicious, camouflaged factory being carried across the desert, they should report it immediately." 