home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c160 / 1.ddi / SOURCE / F4TRUE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-22  |  543 b   |  31 lines

  1.         
  2. /* (c)Copyright Sequiter Software Inc., 1987-1990.  All rights reserved.
  3.  
  4.    f4true.c
  5. */
  6.  
  7. #include "d4base.h"
  8.  
  9. extern  BASE  *v4base ;
  10.  
  11. /* f4true   
  12.  
  13.    Returns a true or false.
  14.  
  15.       -1 on ERROR
  16.        0 on logical FALSE  or  numeric 0
  17.        1 otherwise
  18. */
  19.  
  20. f4true( long field_ref)
  21. {
  22.    char char_value ;
  23.  
  24.    char_value =  *f4ptr( field_ref ) ;
  25.    if ( char_value == 'Y'  ||  char_value == 'y'  ||
  26.          char_value == 'T'  ||  char_value == 't'  )
  27.       return( 1 ) ;
  28.    else
  29.       return( 0 ) ;
  30. }
  31.