Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
needing help on :goto
#1
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.
Reply
#2
(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...
Slackware 13/ArchLinux - C/Assem/Python
Reply
#3
you can define a fuction, then just type the name of the fuction
I.E
Code:
def h():
    print "test"
h()
Reply
#4
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.
Reply
#5
ok thanks guys Thumbsup[/align]
Reply
#6
goto : charatindex[2]

This is the proper command for java and c.

but i do not know about python.
[Image: 2d75599e9a.png]:superman:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)