Support Forums

Full Version: needing help on :goto
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm working on a gambling prototype program and i was wondering.
What the names are of the good old fashion :goto A and :label A commands for commandcenter in python.
(10-17-2009, 02:43 PM)Mr.FeellingLeSS Wrote: [ -> ]I'm working on a gambling prototype program and i was wondering.
What the names are of the good old fashion :goto A and :label A commands for commandcenter in python.

Python doesn't have an equivalent..

If you trying to break out of a nested statement then use break or if you want to get fancy you can use an exception...
you can define a fuction, then just type the name of the fuction
I.E
Code:
def h():
    print "test"
h()
You can also use a loop function.

While
Code:
x = 1
y = 4
while x*x != y:
       x +=1

This one will keep adding 1 to x, until x*x = 4.


For

Code:
a = [1,2,3,4,5,6,7,8,9]
for x in a:
    print x

This will assign every value in a to x and print x.
ok thanks guys Thumbsup[/align]
goto : charatindex[2]

This is the proper command for java and c.

but i do not know about python.