Steven D'Aprano wrote:
On Fri, 17 Apr 2009 14:00:18 -0700, Mensanator wrote:

On Apr 17, 3:37 pm, baykus <baykusde...@gmail.com> wrote:
Hi

I am looking for one of those experimental languages that might be
combination of python+basic. Now thta sounds weird and awkward I know.
That's a clue you won't find anyone seriously contemplating such idiocy.

The reason I am asking is that I always liked how I could reference-
call certain line number back in the days.
A bad idea. If you really want to write bad code, learn C.

It would be interesting to get similar functionality in Python.
Yeah, it would "interesting" just as a train wreck is "interesting", as
long as you're not the one who has to live through it.

Nevertheless, somebody *has* implemented such functionality in Python. Not just GOTO, but also COMEFROM.

http://entrian.com/goto/

I once translated a BASIC program to Pascal (hint: no goto allowed).

Pascal has GOTOs. People rarely used them, because even in the 1970s and 80s they knew that unstructured gotos to arbitrary places was a terrible idea.

GOTO in Pascal required that you defined a label in your code, then you could jump to that label. You can't jump to arbitrary parts of the program, only within the current procedure.

What I found strange was that labels could be only unsigned integers,
but they still had to be declared:

    label 1, 2, 3;

Fortunately the version(s) I used (TurboPascal/Dephi) permitted
identifiers.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to