User Tools

Site Tools


stop_suspend_program_execution_.htm
Navigation:  Language Reference > 13 - Built-in Functions >====== STOP (suspend program execution) ====== Previous pageReturn to chapter overviewNext page

STOP( [ message ] )

blk2blue.jpg

STOP Suspends program execution and displays a message window.
message An optional string expression (up to 64K) which displays in the error window.

STOP suspends program execution and displays a message window. It offers the user the option of continuing the program or exiting. When exiting, it closes all files and frees the allocated memory.

Example:

PswdScreen WINDOW

           STRING(' Please Enter the Password '),AT(5,5)

           ENTRY(@10),AT(20,5),USE(Password),PASSWORD

          END

CODE

OPEN(PswdScreen)                 !Open the password screen

ACCEPT                           !and get user input

 CASE ACCEPTED

 OF ?Password)

  IF Password <;> 'PayMe$moRe'    !Correct password?

  STOP('Incorrect Password Entered – Access Denied – Retry?')

   X# += 1

   IF X# > 3                     !Let them try 3 times

    HALT(0,'Incorrect password') !then throw them out

   END

  END

 END

END

See Also:

HALT

stop_suspend_program_execution_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1