Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FreshWin (c) Fresh Technologies - <b>wlength() window function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  WLENGTH()                                                  Window Function
 Purpose..: Return a window's length
-------------------------------------------------------------------------------
 Syntax...: wLength( [<uWin>] ) --> nLength

 Arguments: [<uWin>] = the string identifier of the window
                       OR the reference to the window structure
                       returned as an array by wNew() or wArray().
                       If not passed, the function will operate on
                       the window in focus.

 Returns..: <N> The number of rows in the text region of the window.

 Remark...: The function works whether the window is open or not.

 Source...: WLENGTH.PRG
-------------------------------------------------------------------------------
 Example..: . The example uses wLength() in conjunction with
              wSay() and wWidth() to display consecutive numbers for
              as many rows as exist in the text area of the current
              window on the window's center column. Two is taken away
              from wLength() to account for the top and bottom
              frame fragments.

            for nCount := 1 to wLength() - 2
               wSay( , nCount, int( wWidth() /2 ), str( nCount, 1 ) )
            next

 Note.....: The routine can be used in conjunction with its counterpart,
            wWidth(), to put a message in the middle of a window.

See Also: wWidth() wTRow() wLCol() wBRow() wRCol() wSay()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson