Documention for: pager.r Created by: btiffin on: 1-Mar-2008 Last updated by: btiffin on: 1-Mar-2008 Format: text/editable Downloaded on: 7-May-2024 [h1 Usage document for %pager.r [contents [numbering-on [h2 Introduction to the REBOL more less pager [p This library script is for supporting REBOL console development and capturing output for perusal. [h2 pager At a Glance [p Note; **more, less, page, and pager** are all defined [asis/style/font-size:75% >> more system >> more %myfile.r >> more/num/cap [repeat i 100 [print ["Radius" i "Area:" i * i * pi] ] ] asis] [h2 Using %pager.r [p Including this tool is simple. Just <strong>DO</strong> it. [asis >>do %pager.r asis] [p or to execute this right out of the rebol.org library [asis/style/font-size:75% >>do http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=pager.r asis] [h3 Application keys [table/att/border="1"/style/font-size:75% [row [cell q [cell Quit out [row [cell b [cell Back a page [row [cell Enter, down arrow [cell Advance one line [row [cell Backspace, Up arrow [cell Back one line [row [cell digit '1' to '9' [cell Advance n lines [row [cell > [cell To bottom [row [cell < [cell To top [row [cell / [cell Find forward [row [cell ? [cell Find reverse [row [cell g [cell Goto line [row [cell n [cell Find next forward [row [cell p [cell Find previous backwards [row [cell w [cell weefresh screen [row [cell h [cell help and info table] [h3 Options [table/att/border="1"/style/font-size:75% [row [cell num: logic! [cell on or off for display of (source file) line numbers [row [cell eof: logic! [cell true waits at end of file [row [cell rows: integer! [cell The console is queried for this, but it can be overridden [row [cell cols: integer! [cell Override the value the console reports table] [h3 Help [asis/style/font-size:75% >> help pager USAGE: PAGER intake /options electives /cap /n /num DESCRIPTION: supports b, <, >, w, /, ?, q while paging PAGER is a function value. ARGUMENTS: intake -- input data or filename (Type: any) REFINEMENTS: /options -- rows: cols: integer!, eof: num: logic! electives -- (Type: block) /cap -- input becomes block to evaluate and capture prin/t] /num -- shortcut (and override) for /options [num: on] asis] [h2 Some advanced 'features' [list [li Using Next or Previous without a search string will scan for "none" [li newlines are inserted at terminal columns sizes. Search will miss strings that span these newlines [li you probably don't want to more/cap [more/cap ...] [li The GC may not get a chance to optimally do its thing due to references [li The author uses more, less, page, and pager. All these words are defined for the same function. Feel free to drop the names you don't use. list] [h2 Credits [table/att/border="1px" [row [cell %pager.r [cell Original author: Brian Tiffin table] [list [li The rebol.org Library Team [li Usage document by Brian Tiffin, Library Team, [date list]