Files
harbour-core/tests/exit.prg
vszakats a4a357a18b 2013-03-15 11:12 UTC+0100 Viktor Szakats (harbour syenar.net)
* /harbour/* -> /*
    * moved whole Harbour source tree one level up to
      avoid single 'harbour' top dir
2013-03-15 11:13:30 +01:00

29 lines
342 B
Plaintext

/*
* $Id$
*/
// quick exit test
PROCEDURE Main()
LOCAL x := 0
DO WHILE x < 10
++x
IF x == 5
EXIT
ENDIF
ENDDO
? "do exit test", iif( x == 5, "passed", "fail" )
FOR x := 1 TO 10
IF x == 5
EXIT
ENDIF
NEXT
? "for exit test", iif( x == 5, "passed", "fail" )
RETURN