Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== IConv Boolean (B) function ====== ==== Description ==== Converts characters or words into internal values of true (1) or false (0). ==== Syntax ==== //internal// = **IConv**(//string//, "**B** [ //tf// ] ") - OR - //internal// = **IConv**(//string//, "**B** [ //true//, //false// ]") ==== Parameters ==== IConv Boolean (B) accepts arguments for the following parameters. ^Parameter^Description^ |//string//|Contains a character or word that represents a Boolean condition. Examples of characters include "Y" and "N" or "T" and "F". Examples of words are "Yes" and "No" or "True" and "False." Any characters or words can be used in //string//. If //string// cannot be converted into a Boolean value, Status() returns a 1.| |//B//\\ - or -\\ //BX//|Indicates a Boolean conversion. If no additional options are provided, the conversion examines the default Boolean conversion in the currently active language/national data set, and uses the first letter of the true //string// and the first letter of the false //string// found there. In the default language/national data set, "B" is interpreted the same as "BYes,No".\\ \\ BX is used for international default conversions. Requires that a language is set in the environment, in field 15 (@environ.set<ENV_LND_DEFAULT$> ), eg LND_GERMAN_D, LND_FRENCH_F, etc., etc., etc. The language needs to be set within the SYSENV record prior to start.| |//Tf//|When the //tf// option is used, the conversion matches the first character of //string// against the characters represented by //t// and //f//, without regard to case. If the first character of string matches //t//, the function returns a Boolean true (1). If the first character matches //f//, a Boolean false (0) is returned. If //string// is null, a null is returned.| |//true,false//|If the //true,false// option is used, the conversion matches //string// against the words represented by //true// and //false//. If //string// matches //true//, a Boolean true is returned. If //string// matches //false//, a Boolean false is returned. For each lowercase alphabetic character in //true,false//, the comparison is done without regard to case. For all other characters (upper case alphabetic or numeric), the comparison is done exactly.\\ || ==== Example ==== <code> * Converting to internal Boolean format VALUE = "T" TEST = IConv(VALUE, "BTF") * TEST is set to 1 (one). /* if the Language is set to French the value of this will be 1 */ value = "Oui" this = Oconv(value, 'BX') </code> guides/programming/programmers_reference_manual/iconv_boolean_b.txt Last modified: 2024/06/19 20:20by 127.0.0.1