| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Converts "Yes" in a national language to a logical value.
IsAffirm( <cChar> ) --> lIsYes
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.
| See also: | HB_LangSelect(), IsNegative() |
| Category: | Language specific , xHarbour extensions |
| Source: | rtl\natmsg.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// 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
http://www.xHarbour.com