home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / f90 / scan.z / scan
Encoding:
Text File  |  2002-10-03  |  2.4 KB  |  60 lines

  1. SCAN(3I)                                              Last changed: 4-13-99
  2.  
  3.  
  4. NNAAMMEE
  5.      SSCCAANN - Scans a string for any one of the characters in a set of
  6.      characters
  7.  
  8. SSYYNNOOPPSSIISS
  9.      SSCCAANN (([SSTTRRIINNGG==]_s_t_r_i_n_g,, [SSEETT==]_s_e_t [,,[BBAACCKK==]_b_a_c_k]))
  10.  
  11. IIMMPPLLEEMMEENNTTAATTIIOONN
  12.      UNICOS, UNICOS/mk, IRIX systems
  13.  
  14.      CF90, MIPSpro 7 Fortran 90
  15.  
  16. SSTTAANNDDAARRDDSS
  17.      Fortran
  18.  
  19. DDEESSCCRRIIPPTTIIOONN
  20.      The SSCCAANN intrinsic function scans a string for any one of the
  21.      characters in a set of characters.  It accepts the following
  22.      arguments:
  23.  
  24.      _s_t_r_i_n_g    Must be of type character.
  25.  
  26.      _s_e_t       Must be of type character.
  27.  
  28.      _b_a_c_k      Must be of type logical.  If _b_a_c_k is omitted, a value of
  29.                false is assumed.
  30.  
  31.      SSCCAANN is an elemental function.  The name of this intrinsic cannot be
  32.      passed as an argument.
  33.  
  34. RREETTUURRNN VVAALLUUEESS
  35.      SSCCAANN returns the character position of the first character in _s_t_r_i_n_g
  36.      that matches any characters in _s_e_t.  The result is a default integer.
  37.  
  38.      If _b_a_c_k is absent or present with value false and if _s_t_r_i_n_g contains
  39.      at least one character that is in _s_e_t, the value of the result is the
  40.      position of the leftmost character of _s_t_r_i_n_g that is in _s_e_t.
  41.  
  42.      If _b_a_c_k is present with the value true, and if _s_t_r_i_n_g contains at
  43.      least one character that is in _s_e_t, the value of the result is the
  44.      position of the rightmost character of _s_t_r_i_n_g that is in _s_e_t.
  45.  
  46.      SSCCAANN returns zero if no character in _s_t_r_i_n_g is in _s_e_t, or if the
  47.      length of _s_t_r_i_n_g is zero.
  48.  
  49. EEXXAAMMPPLLEESS
  50.      Example 1:  The statement SSCCAANN((''FFOORRTTRRAANN'',, ''TTRR'')) returns the value 3.
  51.  
  52.      Example 2:  The statement SSCCAANN((''FFOORRTTRRAANN'',, ''TTRR'',, BBAACCKK==..TTRRUUEE..)) returns
  53.      the value 5.
  54.  
  55.      Example 3:  The statement SSCCAANN((''FFOORRTTRRAANN'',, ''BBCCDD'')) returns the value 0.
  56.  
  57. SSEEEE AALLSSOO
  58.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed version of this
  59.      man page.
  60.