Bar format - %Nbr[options]

In this section:

This format, %br (Bar), draws a horizontal or vertical bar which is partially filled with a given colour. The first argument is a DOUBLE PRECISION control variable that indicates the extent of the fill. This variable should have a value between 0.0D0 and 1.0D0 inclusive. The second argument is an (r,g,b) colour value given by RGB@. N is used to specify the length of the bar, in average characters, when fully filled.

If options are supplied they should be placed in square brackets and separated by commas. The following options are available:


Bar is drawn horizontally left to right (default).


Bar is drawn horizontally right to left.


Bar is drawn vertically from the top.


Bar is drawn vertically from the bottom.


No bar border is drawn.

The bar is updated by using the WINDOW_UPDATE@ function. This should be called at suitable intervals to provide a smooth progression. This is illustrated in the following example:

        INCLUDE <windows.ins>
        INTEGER ctrl
        i=winio@('%ca[Bar format]&')
        i=winio@('Processing .....%2nl&')
        DO WHILE(d.LT.1.0)
          DO i=1,100000
          END DO
    c---- The data has changed so prompt windows to ---
    c---- update the bar display ---
          CALL window_update@(d)
        END DO

The above program will produce a horizontal bar which will extend to the right as the task proceeds.



Copyright © 1999-2024 Silverfrost Limited