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>atestn() - check if a number is in a numeric array</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     atestn() - check if a number is in a numeric array
  Usage:    <integer> = atestn(<number>,<array>,[<start>])
  Params:   numeric <number>, numeric to check for
            array <array>, an array of numbers
            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 <number>
            matches the number in the array. If no match is found,
            then 0 is returned.

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

                 declare numbers[6]
                 numbers[1] = 1000
                 numbers[2] = 1492
                 numbers[3] = 1567
                 numbers[4] = 234535
                 numbers[5] = 175.98
                 numbers[6] = 1567

                 ? atestn(1567,numbers)
                 * prints 3

                 ? atestn(1567,numbers,4)
                 * prints 6

                 ? atestn(1567,numbers,7)
                 * prints 0

                 ? atestn(456,numbers)
                 * prints 0

See Also: atest()

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