Is there a "goto" operator?

Just curious … I’ve been scripting for a while but nothing too in depth. I’m making a larger script and was wondering if there is an equivalent to the BASIC “goto” command. Something like this:


ENTER_DATA
set BIG to [USER INPUT]
set SMALL to [USER INPUT]
if BIG is less than SMALL
  then goto ERROR

...

ERROR
display dialog "Please reenter your data."
goto ENTER_DATA

That’s maybe not a great example because I know I could define that as a routine, but what I need to do is go back a few lines in an if-then statement to allow a user to reenter data if it doesn’t jive with what I want them to enter. Anything that can do this? Hope thats not too confusing …

Thanks

Maybe something like this will work. It will not proceed until the criteria is met.

set BIG to 2
set SMALL to 3

repeat until BIG is greater than or equal to SMALL
	set BIG to text returned of (display dialog "Enter BIG" default answer "")
	set SMALL to text returned of (display dialog "Enter SMALL - must be less than or equal to " & BIG default answer "")
end repeat

– Rob