SOLVED - How do I stop code from executing?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
admin12
Posts: 412
Joined: Wed May 11, 2011 9:47 am

SOLVED - How do I stop code from executing?

Post by admin12 » Mon Jul 25, 2011 3:17 pm

I have two password fields. I want to be able to compare them and if they do not match, I want to stop executing code so they can re-enter the passwords again.

Here is the code chunk:

========================
if UserPass1 <> UserPass2 then
answer "Passwords do not match - try again"
Go to top
else
end if
========================

What do I have to do to make it stop? I thought it was Go to top, but that does not work.

Thanks in advance.

Mike
Last edited by admin12 on Mon Jul 25, 2011 4:57 pm, edited 1 time in total.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10330
Joined: Wed May 06, 2009 2:28 pm

Re: How do I stop code from executing?

Post by dunbarx » Mon Jul 25, 2011 3:42 pm

"Exit" to top is what you are looking for. You can also simply exit the enclosing handler, or, depending on how it is written, maybe recall it?

Craig Newman

Post Reply