Re: with entry and goto statement

new topic     » goto parent     » topic index » view thread      » older message » newer message
petelomax said...
mexzony said...

also why no example for the goto statement.

There shouldn't be an example. As a beginner, you should consider the goto statement as pure evil, something you use once-in-a-decade, when you really have no other choice. If you have a block of code that you need to invoke from several places, put it in a subroutine.

Regards, Pete

I know it is the current fashion amongst all developers to bash the GOTO statement. It is undesirable to do so.

Let me be precise. There is unjustified abhorrence of GOTO and many other features which are direct descendants of CPU behavior (as seen in Assembler). Jump Relative, Jump Conditional and Jump Absolute are the cornerstone of writing in Assembler. Their cousins, Call Relative, Call Absolute and Call Conditional are seen in the GOSUB statement.

It is a matter of great surprise that we accept all the implied GOTOs within IF-THEN-ELSE and even Exits from this and DO-WHILE loops and frown upon GPTOs created by the program writer.

Funnily when we write an Application for the end user we give the End User ALL the facility of GOTO and GOSUB, by allowing him to branch out to any part of application and return or not return at the user's own choosing! It seems that Application users are very comfortable working with these facilities which the compiler writer is denying to the sophisticated Application developer.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu