xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

IsAffirm()

Converts "Yes" in a national language to a logical value.

Syntax

IsAffirm( <cChar> ) --> lIsYes

Arguments

<cChar>
This is a single character. It is compared case-insensitive with the first letter of the word "Yes" of the currently selected national language.

Return

The function returns .T. (true) if <cChar> is the first letter of the word "Yes" in the currently selected national language (see HB_LangSelect()). Otherwise, .F. (false) is returned.

Info

See also:HB_LangSelect(), IsNegative()
Category: Language specific , xHarbour extensions
Source:rtl\natmsg.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example uses three national languages and displays the result
// of IsAffirm().

   REQUEST HB_LANG_DE          // request German language
   REQUEST HB_LANG_FR          // request French language

   PROCEDURE Main

      // English language is default: "Yes"

      ? IsAffirm( "J" )        // result: .F.
      ? IsAffirm( "O" )        // result: .F.
      ? IsAffirm( "Y" )        // result: .T.

      HB_LangSelect( "DE" )    // "Ja" == "Yes"

      ? IsAffirm( "J" )        // result: .T.
      ? IsAffirm( "O" )        // result: .F.
      ? IsAffirm( "Y" )        // result: .F.


      HB_LangSelect( "FR" )    // "Oui" == "Yes"

      ? IsAffirm( "J" )        // result: .F.
      ? IsAffirm( "O" )        // result: .T.
      ? IsAffirm( "Y" )        // result: .F.
   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe