Results 1 to 3 of 3

Thread: Exiting a program from inside a function - RESOLVED

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2004
    Posts
    43

    Resolved Exiting a program from inside a function - RESOLVED

    Hi all,

    Let's say I have a Sub Main procedure, that calls a function inside the Sub:

    Code:
    Sub Main ( )
    
         Call TheFunction(True)
    
    End Sub
    
    
    Function TheFunction(blnVar as Boolean)
    
         If blnVar = True Then
     
           ' I want to kill the Sub Main ( ) here!
    
         End If
    
    End Function
    I do realize that I can return a bool value from the function and then do a following check that if the return value is true then exit the Sub. I was just wondering if there is a way to kill the Sub Main from inside the Function.

    Sanctos
    Last edited by sanctos2003; Dec 2nd, 2004 at 12:06 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width