Jump Over The Bridge!!!

K

kennykee

Normally, code will run from top of the page to end of the page.
But how to jump step/code lines if I execute an event?

Any ideas?

Thanks in advance

Kennykee
 
D

Dennis

You should not need to if your code is structured properly but you can put
lables in code with a colon (labels are ignored as a code line) e.g.

Code line 1
Code line 2
JumpHere:
Another Code Line

You can goto the label with a Goto statement e.g.

Goto JumpHere
 
K

Klatuu

Don' go teaching newbies about GoTo :)

GoTo is a myth invented by the evil dark side. The best comment I ever
heard about the GoTo:

If you use a GoTo, you don't understand the problem.
 
J

Jim C.

There is an exception to every rule....and for this the one time to use GoTo
is for error handling (On Error GoTo...)

Jim C.
 
K

Klatuu

LOL, I knew somebody would take my joke too seriously. You are correct, but
that is a whole different issue.
 
K

Klatuu

Oh, I forgot to mention. Error handling is for wienies. Just write perfect
error free code like I do.
 
T

Tom Lake

Klatuu said:
LOL, I knew somebody would take my joke too seriously. You are correct,
but
that is a whole different issue.

When is MS going to get with the program? ANSI (ISO) BASIC has had
structured
error handling for years. No GOTO needed:

WHEN EXCEPTION IN
code block
USE
code block to be executed
when error occurs
END WHEN

Tom Lake
 
D

David C. Holley

Only if its to handle an error.
Don' go teaching newbies about GoTo :)

GoTo is a myth invented by the evil dark side. The best comment I ever
heard about the GoTo:

If you use a GoTo, you don't understand the problem.

:
 
D

David C. Holley

I personally like the Try...Catch statements of Java - although I've
never actually used it. (The caffeine keeps me up at night)
 
R

RD

When is MS going to get with the program? ANSI (ISO) BASIC has had
structured
error handling for years. No GOTO needed:

WHEN EXCEPTION IN
code block
USE
code block to be executed
when error occurs
END WHEN

Tom Lake

On Error GoTo... *is* a structure. Just because it's looked down on doesn't
mean it isn't what it is. An apartment building and a four bedroom house are
both structures. I know which I'm more comfortable with but the next guy might
prefer things another way.
 
Top