Terminate/Break Method

Questions, tips and tricks and techniques for scripting in Servoy

Terminate/Break Method

Postby 4xjbh » Wed Jul 15, 2009 4:39 pm

How do I break a method that is not part of loop or switch statement?
4xjbh
 
Posts: 146
Joined: Fri Feb 24, 2006 8:06 am
Location: Brisbane, Australia

Re: Terminate/Break Method

Postby ROCLASI » Wed Jul 15, 2009 5:56 pm

You mean in code ?
You place a return like so:

Code: Select all
// code
if ( something == notRight ) {
     return; // stop this method
}
// more code



Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium


Return to Methods

Who is online

Users browsing this forum: No registered users and 34 guests

cron