REXX Tips & Tricks, Version 2.80


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


Show an "in Progress" indicator





 
/* example for an in progress indicator                               */
/* note:     This code uses ESC sequences to position the cursor      */

  p1.0 = "\"
  p1.1 = "-"
  p1.2 = "/"
  p1.3 = "-"
  p2 = 0

  inputFile = "C:\OS2\INI.RC"

  do until lines( inputFile ) = 0
                                /* get next line                      */
                                /* this is an example to do something */
    curLine = LINEIN( inputFile )

                                /* show progress indicator            */
                                /* use ESC sequences to position      */
                                /* the cursor                         */
    call charOut , "1B"x || "[s Reading " || p1.p2 || "1B"x || "[u"
    p2 = (p2+1) // 4

    /* ... */

  end /* do until lines( inputFile ) = 0 */

                                /* do a linefeed                      */
  say ""

  

Inf-HTML End Run - Successful