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 - pickscan() scan a list for a string http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 pickscan()          Scan a list for a string
------------------------------------------------------------------------------
 Declaration
   pick.hdr

 Syntax
   func uint pickscan extern
   param value _SLIST pList, ;
         const char   cString

 Arguments
   pList is the list to scan.
   cString is the character string to search for.

 Return
   The index number indicating the position of the string in the list,
   or 0 if the string is not found.

 Description
   The pickscan() function searches a list for the passed string, and returns
   its position if a perfect match is found.

   This function can only be used with string lists, but not with generic
   lists that contain non-character data.

 Example
   #define EXAMPLE_LIST
   #include example.hdr

   proc Test_pickscan
   vardef
      _SLIST pList
      uint   n
   enddef
   pList := ExampleList()
   ?
   n := pickscan( pList, " 8 August" )
   ? "pickscan() found ==>", pickstr( pList, n ) // find a string
   pickclear( pList )
   endproc

   proc main
   Test_pickscan()
   endproc

See Also: pickeval()

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