Files
harbour-core/tests/fornext.prg
Viktor Szakats 3ed9fa0f45 2016-01-14 19:33 UTC+0100 Viktor Szakats (vszakats users.noreply.github.com)
* *
    % remove brandings and homepage from copyright header. Pass 2 - semi-auto.
    * project homepage and name is described in README, amongst others
    ; this should make the diff between 3.4 and 3.2 easier to manage
2016-01-14 19:35:07 +01:00

39 lines
462 B
Plaintext

// Testing Harbour FOR NEXT loops
//
// Written by Eddie Runia <eddie@runia.com>
//
// Placed in the public domain
//
PROCEDURE Main()
LOCAL n
? "Testing Harbour For Next loops. Going up quick"
FOR n := 1 TO 10 STEP 4
? n
NEXT
? "Going down"
FOR n := 10 TO 1 STEP -1
? n
NEXT
? "No step"
FOR n := 1 TO 10
? n
NEXT
? "No production"
FOR n := 1 TO 10 STEP -1
? n
NEXT
? "Ok!"
RETURN