Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - picksetlinech() define the separator character of a list http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 picksetlinech()     Define the separator character of a list
------------------------------------------------------------------------------
 Declaration
   pick.hdr

 Syntax
   func uint picksetlinech extern
   param value _LIST pList, ;
         value uint  uLineChar

 Arguments
   pList is a list pointer.
   uLineChar is the ASCII code of the separator line character.

 Return
   The ASCII code of the previous separator character.

 Description
   To picksetlinech() function is used to redefine the separator line
   character for a list with the ASCII code of the new character in
   uLineChar. By default the pickdisp() function uses the "-" (chr(196))
   character for separator lines.

   This function is normally used with string lists to be displayed via the
   pickdisp() function.

 Example
   #define EXAMPLE_LIST
   #include example.hdr

   proc Test_picksetlinech
   vardef
      _SLIST pList
   enddef
   pList := pickinit()
   pickadd( pList, "&First item" )
   pickadd( pList, "&Second item" )
   pickadd( pList, "-" )
   pickadd( pList, "&Third item" )
   pickadd( pList, "&Fourth item" )
   pickadd( pList, "-" )
   pickadd( pList, "Fift&h item" )
   
   @ 4, 9 to 12, 21
   pickdisp( pList, 5, 10, 11, 20 )      // Output: +-----------+
                                         //         |First item |
                                         //         |Second item|
                                         //         |-----------|
                                         //         |Third item |
                                         //         |Fourth item|
                                         //         |-          |
                                         //         |Fifth item |
                                         //         +-----------+
   picksetlinech( pList, '-' )
   
   pickdisp( pList, 5, 10, 11, 20 )      // Output: +-----------+
                                         //         |First item |
                                         //         |Second item|
                                         //         |-          |
                                         //         |Third item |
                                         //         |Fourth item|
                                         //         |-----------|
                                         //         |Fifth item |
                                         //         +-----------+
   pickclear( pList )
   endproc

   proc main
   Test_picksetlinech()
   endproc

See Also: picklinech()

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