Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>atest() - check if a character matches any array elements</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     atest() - check if a character matches any array elements
  Usage:    <integer> = atest(<char>,<array>,[<start>])
  Params:   char <char>, character to check for
            array <array>, an array of strings
            integer <start>, the element # to start search, (optional),
            if left off, the search starts at element #1.
  Returns:  integer equal to the element number of the first
            instance starting at element <start> where <char>
            matches the first character of an element. If no match
            is found, then 0 is returned.

 ---------------------------------- Example ---------------------------------

                 declare strings[5]
                 strings[1] = "Append"
                 strings[2] = "Edit"
                 strings[3] = "Delete"
                 strings[4] = "Access Codes"
                 strings[5] = "Quit"

                 ? atest("D",strings)
                 * prints 3

                 ? atest("a",strings)
                 * prints 1

                 ? atest("A",strings,2)
                 * prints 4

                 ? atest("T",strings)
                 * prints 0

  Note:     This search is NOT case sensitive and leading spaces
            are ignored.

See Also: atestn()

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