// As pessoas que estão acostumadas a Java ou C# podem estar muito zangadas com Delphi e nem mesmo têm tipos básicos eles aqui fora.
unidade de base de base;
interface
usos
Sysutils, aulas, Strutils, Idglobal, Matemática;
tipo
Tcharset = conjunto de char;
var
TNORMALCHARSET: TCHARSET = [ #13, #10, #32, '.', ',', ';'];
tipo
TString = classe
Privado
Ftext: string;
público
função charat (apposição: número inteiro): char;
// as letras da posição especificada
função tolowercase: string;
Função de classe TolowerCase (Astring: String): String;
// minúscula
função toupppercase: string;
Função de classe TOUPPERCASE (Astring: String): String;
//capital
Função de classe Valorof (Avalue: String): Boolean;
Classe Função Valorof (Avalue: Boolean): String;
Classe Função Stringin (Avalue: String; Avalias: Matriz de String): Boolean;
Função de classe esquerda (Avalue: String; Alngth: Inteiro): String;
Função de classe Right (Avalue: String; Alngth: Inteiro): String;
Função de classe DeLetePrefix (Avalue: String; FILLSTRING: TCHARSET = [#32]): String;
Função de classe DeleteSuffix (Avalue: String; FILLSTRING: TCHARSET = [#32]): String;
//
Classe Função CompareString (Avalue1: String; Avalue2: String): Boolean;
Função de classe HashCode (Avalue: String): Inteiro;
Função de classe LastChar (Avalue: String): char;
Classe function stringLeplace (const S, OldPattern, newPattern: string;
Sinalizadores: trepplaceflags): string;
classe função stringofchar (ch: char; count: integer): string;
classe Função SetString (var s: string; buffer: pchar; len: integer): string;
Função de classe getpy (Astr: string): string;
// Obtenha o Pinyin correspondente.
função de classe isallchinese (Astr: string): boolean;
função de classe isallenglish (Astr: string): boolean;
Função de classe getFirstword (Avalue: String; var AWORD: String; Aseparator: Tcharset): Inteiro;
Função de classe getFirstword (Avalue: string; var aword: string; assarator: string): Integer;
// O valor de retorno é o comprimento do início ao documento.
Função de classe GetAllword (Avalue: String; Aseparator: String): TStringList;
// retorna todas as palavras -chave. Depois de usá -lo, liberte o conjunto de resultados;
// Nota: Por favor, não use esta função em uso futuro. Por favor, use sua versão recarregada
// getAllword (Avalue: String; Aseparator: String; AstringList: TStringList);
Classe Procedimento GetAllword (Avalue: String; Aseparator: String; AstringList: TStrings);
// Carregar todos os resultados de resultados na lista de adstring;
Classe Procedimento GetAllWordWithall (Avalue: String; Aseparator: String; AstringList: TStrings);
Classe function stringToCharSet (Avalue: String): Tcharset;
Classe function charsetToString (Avalue: tcharset): string;
Função de classe Atualizações
AUPDATESource: string; // A palavra encontrada.
AUPDATESTRING: String;
AsentenceseParator: String;
AwordSeparator: String // Document Separator;
): String; // Resultado de retorno.
// por exemplo, o valor de retorno de 'dBarcode ASC, dname desc', 'dBarcode', '', ',', '' é
// 'dname desc';
Função de classe Deleterepeat (AoldString: String; // para lidar com os caracteres
Adeletestring: Char; // O personagem a ser excluído
ArePeat: char): String;
função de classe ifthen (aexpression: boolean; atrue: string; afalse: string): string;
// retorna a sequência correspondente de acordo com o valor da expressão.
Função de classe AbsolutEtorElate (AABSOLUTE: String; ACURRENT: String): String;
// Dando dois arquivos, converta o caminho absoluto para o caminho relativo.
Classe função relatetoabsolute (arate: string; acorrente: string): string;
Função de classe similarPosition (AONE, Atwo: String): Inteiro;
função de classe getcharnum (adstring: string; achar: char): inteiro;
Função de classe IndexOf (Astring, Asubstring: String): Inteiro;
Função de classe ZeroToint (Astring: String): Inteiro;
função de classe zerotofloat (adstring: string): duplo;
Função de classe Zerotostr (Astring: String): String;
Função de classe SameText (Astring, Astring1: String): Boolean;
classe função reversa (adstring: string): string;
função de classe isValidip (const s: string): boolean;
Função de classe FillString (ACHAR: CHAR; ALMENGLE: INTEGER): String;
Função de classe StuffString (const Atext: String; Astart, Alngth: cardeal;
const asubtext: string): string;
Função de classe getNextString (var Sourcestring: string; asplitchar: string): string;
fim;
// tipo inteiro.
Tinteger = classe
Função de classe Inttostr (AINTEGER: Inteiro): String;
Função de classe Inttostr (AINTEGER: INT64): String;
função de classe isValidInt (adstring: string): boolean;
Função de classe IsValidInt64 (Astring: String): Boolean;
Função de classe Maxint: Inteiro;
Função de classe Maxlongint: Inteiro;
Função de classe HashCode (AINTEGER: INTERGER): Inteiro;
função de classe inttobin (ainteger: cardeal): string;
Função de classe InttoHex (AINTEGER: INTERGER): String;
Função de classe Hextoint (Astring: String): Inteiro;
Função de classe makeRialNo (AINTEGER: Inteiro; Adigit: Integer): String;
fim;
Tfloat = classe
função de classe isValidfloat (adstring: string): boolean;
Função de classe MaxDouble: Double;
Função de classe Mindouble: Double;
Função de classe MaxExtended: Extended;
Função de classe Minextended: Extended;
Classe Função Mesmo Valor (const a, B: Single; epsilon: single = 0): boolean;
Classe Função Mesmo Valor (const A, B: Double; Epsilon: Double = 0): Boolean;
Classe Função Mesmo Valor (const a, B: estendido; epsilon: estendido = 0): boolean;
Função de classe FLOATTOMONEY (Valor const: Double; Round: Boolean = True): String;
fim;
Tboolean = classe
Classe função booltstr (Apoolean: boolean): string;
função de classe strtobool (adstring: string): boolean;
fim;
Implementação
{TString}
função getpyIndexchar (achar: string): char;
Começar
Palavra do caso (achar [1]) shl 8 + word (achar [2]) de
$ B0A1 .. $ B0C4: Resultado: = 'A';
$ B0C5 .. $ B2C0: Resultado: = 'B';
$ B2C1 .. $ B4ED: Resultado: = 'C';
$ B4ee .. $ b6e9: resultado: = 'd';
$ B6ea .. $ b7a1: resultado: = 'e';
$ B7a2 .. $ b8c0: resultado: = 'f';
$ B8C1 .. $ B9FD: Resultado: = 'G';
$ B9fe .. $ bbf6: resultado: = 'h';
$ BBF7 .. $ BFA5: Resultado: = 'J';
$ BFA6 .. $ C0AB: Resultado: = 'K';
$ C0ac .. $ c2e7: resultado: = 'l';
$ C2E8 .. $ C4C2: Resultado: = 'M';
$ C4c3 .. $ c5b5: resultado: = 'n';
$ C5B6 .. $ C5BD: Resultado: = 'O';
$ C5BE .. $ C6D9: Resultado: = 'P';
$ C6DA .. $ C8BA: Resultado: = 'Q';
$ C8BB .. $ C8F5: Resultado: = 'R';
$ C8F6 .. $ CBF9: Resultado: = 'S';
$ CBFA .. $ CDD9: Resultado: = 'T';
$ CDDA .. $ CEF3: Resultado: = 'W';
$ CEF4 .. $ D188: Resultado: = 'X';
$ D1b9 .. $ d4d0: resultado: = 'y';
$ D4d1 .. $ d7f9: resultado: = 'z';
outro
Resultado: = char (0);
fim;
fim;
classe função tString.getpy (Astr: string): string;
var
I: Inteiro;
Começar
Resultados: = '';
para i: = 1 a comprimento (Astr)
Começar
Se byteType (Astr, i) = mbtrailbyte então
Resultado: = Resultado + getPyIndexchar (Astr [i - 1] + Astr [i])
outro
Se byteType (Astr, i) = mbsinglebyte então
Resultado: = Resultado + Astr [i];
fim;
fim;
função tString.Charat (Aposposição: Inteiro): char;
Começar
Resultado: = ftext [Aposposição];
fim;
Classe função tString.CharSetToString (Avalue: tcharset): string;
Começar
fim;
Função de classe TString.comparestring (Avalue1, Avalue2: String): Boolean;
Começar
Resultado: = Uppercase (Avalue1) = Uppercase (Avalue2);
fim;
Classe function tString.DeletePrefix (Avalue: String;
FILLSTRING: TCHARSET): string;
Começar
enquanto System.Length (Avalue)> 0 do
Começar
Se Avalue [1] em FixString, então
Delete (Avalue, 1, 1)
outro
Quebrar;
fim;
Resultado: = Avalue;
fim;
classe função tString.getfirstword (Avalue: string; var aword: string; assarator: tcharset
): Inteiro;
var
tmpstr: string;
tmppos: número inteiro;
Começar
tmpstr: = deleteSuffix (Avalue, Aseparator);
tmpstr: = DeLetePrefix (Avalue, Aseparator);
Resultado: = Comprimento (Avalue) - Comprimento (TMPSTR);
{if comprimento (tmpstr) = 0 então saia;
if (tmpstr [1] = '' '') e (tmpstr [2] = '' '') então
Começar
para tmppos: = 3 a comprimento (tmpstr)
Começar
Se tmpstr [tmppos] em ['' ''] então
Quebrar;
fim;
fim;
se tmppos> 3 então tmppos: = tmppos + 2;
}
para tmppos: = 1 a comprimento (tmpstr)
Começar
Se tmpstr [tmppos] no assarator então
Quebrar;
fim;
tmppos: = tmppos -1;
// {TODO: -OGHS corrigiu o último parâmetro parsing incorretamente}
if (tmppos = 0) e (Avalue <> '') então
tmppos: = comprimento (avaliação);
AWORD: = Copy (Avalue, resultado + 1, TMPPOS);
Resultado: = resultado + tmppos;
fim;
Classe function tString.hashcode (Avalue: String): Inteiro;
var
I: Inteiro;
tmpValue: Inteiro;
Começar
tmpValue: = 0;
para i: = 1 a System.length (Avalue)
Começar
tmpValue: = 3 * tmpValue + ord (Avalue [i]);
fim;
Resultado: = tmpValue;
fim;
Classe function tString.isallchinese (ast: string): boolean;
var
I: Inteiro;
Começar
Resultado: = true;
para i: = 1 a comprimento (Astr)
Começar
Se byteType (Astr, i) = mbsinglebyte então
Começar
Resultado: = false;
Quebrar;
fim;
fim;
fim;
função de classe tString.isallenglish (Astr: string): boolean;
var
I: Inteiro;
Começar
Resultado: = true;
para i: = 1 a comprimento (Astr)
Começar
Se byteType (Astr, i) <> mbsinglebyte então
Começar
Resultado: = false;
Quebrar;
fim;
fim;
fim;
Classe function tString.lastchar (Avalue: String): char;
Começar
Resultado: = Avalue [System.Length (Avalue)];
fim;
classe função tString.left (Avalue: String; Alngth: Integer): String;
Começar
Resultado: = cópia (Avalue, 1, Alnken);
fim;
classe função tString.right (Avalue: String; Alngth: Integer): String;
Começar
Resultado: = strutils.rightStr (Avalue, Alngth);
fim;
classe função tString.SetString (var s: string; buffer: pchar;
Len: Inteiro): String;
Começar
System.SetString (S, Buffer, Len);
Resultados: = S;
fim;
Função de classe TString.Stringin (Avalue: String;
Avalas: matriz de string): booleano;
var
I: Inteiro;
Começar
Resultado: = false;
para i: = baixo (avalia) a altos (avalia)
Começar
Se uppercase (Avalue) = Oppercase (Avalia [i]) então
Começar
Resultado: = true;
Quebrar;
fim;
fim;
fim;
classe função tString.Stringofchar (ch: char; contagem: inteiro): string;
Começar
Resultado: = System.Stringofchar (CH, contagem);
fim;
Função de classe TString.StringReplace (const S, OldPattern,
Newpattern: string;
Começar
Resultado: = sysutils.stringReplace (S, OldPattern, newpattern, sinalizadores);
fim;
Classe função tString.StringToCharSet (Avalue: String): Tcharset;
var
I: Inteiro;
Começar
Resultados: = [];
para i: = 1 a comprimento (Avalue) fazer
Começar
Resultado: = Resultado + [Avalue [i]];
fim;
fim;
função tString.TolowerCase: string;
Começar
Resultado: = minúsculo (ftext);
fim;
function tString.TOUPPERCASE: String;
Começar
Resultado: = uppercase (ftext);
fim;
Classe function tString.ValueOf (Avalue: Boolean): String;
Começar
se avaliar então
Resultado: = 'Sim'
outro
Resultado: = 'Não';
fim;
Função de classe TString.ValueOf (Avalue: String): Boolean;
Começar
Resultado: = stringin (Avalue, ['Sim', 'Sim', 'Ok']);
fim;
Classe function tString.getFirstword (Avalue: string; var aword: string;
Aseparator: String): Inteiro;
Começar
Resultado: = getFirstword (Avalue, Aword, StringTarCharset (Aseparator));
fim;
Classe function tString.getAllword (Avalue, Aseparator: String): TStringList;
var
tmplist: tStringList;
tmpword: string;
Começar
tmplist: = tStringList.create;
enquanto comprimento (Avalue)> 0 do
Começar
tmpword: = '';
Delete (Avalue, 1, getFirstword (Avalue, tmpword, assarator));
Se tmpword <> '' então
tmplist.add (tmpword)
outro
Quebrar;
fim;
Resultado: = tmplist;
fim;
função de classe tString.UpdatesEntence (AoldString, Aupdatesource,
AUPDATESTRING, ASENTENSEPARATOR, AWORDSEPARATOR: String): String;
var
tmpSentence: string;
tmpword: string;
tmpword1: string;
I: Inteiro;
tmpresult: string;
Começar
// Obtenha a primeira frase
tmpSentence: = AoldString;
tmpreSult: = '';
enquanto comprimento (tmpsencence)> 0 do
Começar
i: = getfirstword (tmpSentence, tmpword, asntenceseParator);
tmPResult: = tmPResult + esquerda (tmpSentence, i - comprimento (tmpword));
Excluir (tmpsentence, 1, i);
Se tmpword <> '' então
Começar
i: = getfirstword (tmpword, tmpword1, awordseparator);
tmPRESULT: = tmPresult + esquerda (tmpword, i - comprimento (tmpword1));
Se compararestring (tmpword1, Aupdatesource) então
Começar
tmpreSult: = tmpresult + AupDateString;
fim
outro
Começar
tmpreSult: = tmpreSult + tmpword;
fim;
fim;
fim;
tmPResult: = DeLetePrefix (tmPResult, ['', '']);
tmPResult: = deleteSuffix (tmpresult, ['', ',']);
tmPResult: = Deleterepeat (tmPResult, ',', '');
tmPResult: = Deleterepeat (tmPResult, '', '');
Resultado: = tmpreSult;
fim;
classe função tString.DeleteRePeat (AoldString: String; Adeletestring,
ArePeat: char): string;
var
I: Inteiro;
tmpfind1: booleano;
Começar
tmpfind1: = false;
para i: = comprimento (aoldstring)
Começar
Se tmpfind1, então
Começar
Se AoldString [i] = Adeletestring então
Delete (AoldString, i, 1)
outro
Começar
Se AoldString [i] = ArePeat então
Continuar;
tmpfind1: = aoldString [i] = adeletestring;
fim;
fim
outro
Começar
Se AdeleTestring <> ArePeat então
Se AoldString [i] = ArePeat então
Continuar;
tmpfind1: = aoldstring [i] = adletestring
fim;
fim;
Resultado: = AoldString;
fim;
Classe function tString.DeletSuffix (Avalue: String;
FILLSTRING: TCHARSET): string;
Começar
enquanto System.Length (Avalue)> 0 do
Começar
Se Avalue [System.Length (Avalue)] em FixString, então
Delete (Avalue, System.Length (Avalue), 1)
outro
Quebrar;
fim;
Resultado: = Avalue;
fim;
Classe Procedimento TString.GetAllWord (Avalue, Aseparator: String;
Astringlist: TStrings);
var
tmpword: string;
Começar
Se AstringList = nil então
AstringList: = tStringList.create;
enquanto comprimento (Avalue)> 0 do
Começar
tmpword: = '';
Delete (Avalue, 1, getFirstword (Avalue, tmpword, assarator));
Se tmpword <> '' então
AstringList.add (tmpword)
outro
Quebrar;
fim;
fim;
função de classe tString.Ifen (Aexpression: boolean; atrue,
Afalse: string): string;
Começar
Se a expressão então
Resultado: = ATRUTE
outro
Resultado: = afalse;
fim;
Função de classe TString.AbsoluteTorElate (AABSOLUTE,
ACRENTE: String): String;
var
tmpsimilarString: string;
Aoldfile: string;
I: Inteiro;
tmppos: número inteiro;
Começar
// Após a conversão, ele se forma .../../A.ini;
// Se não estiver na mesma unidade, ele retornará diretamente ao caminho absoluto.
Se extraCillerive (AABSOLUTE) <> ExtraCtfiledRive (ACURRENT), então
Resultado: = AABSOLUTE
outro
Começar
tmpsimilarString: = '';
Aoldfile: = aabsolute;
AABSOLUTE: = ExtractFilePath (AABSolute);
tmppos: = similarPosition (aabsolute, terente);
Excluir (aoldfile, 1, tmppos - 1);
Excluir (acorrente, 1, tmppos - 1);
para i: = 0 para getcharnum (acorrente, '/') -1 fazer
Começar
tmpsimilarString: = tmpsimilarString + '../';
fim;
Resultado: = tmpsimilarString + AoldFile;
fim;
fim;
classe função tString.RelateToABSolute (arate, acorrente: string): string;
var
tmpsimilarString: string;
TMProotCount: Inteiro;
I: Inteiro;
Começar
Se comprimento (Arelate)> 2 então
Começar
Se Arelate [2] = ':' então
Começar
Resultado: = Arelate;
Saída;
fim;
fim;
tmpsimilarString: = '';
tmProotCount: = 0;
Enquanto é verdade
Começar
Se LeftStr (Arelate, 3) = '../' então
Começar
Inc (tmProotCount);
Delete (Arelate, 1, 3);
fim
outro
quebrar;
fim;
tmpsimilarString: = reverrestring (ExtractFilePath (ACURRENT));
para i: = 0 a tmprootcount
Começar
Excluir (tmpsimilarString, 1, pos ('/', tmpsimilarString));
fim;
Resultado: = reverrestramento (tmpsimilarString) + areLate;
fim;
Classe function tString.SimilarPosition (AONE, ATWO: String): Integer;
var
I: Inteiro;
Max: Inteiro;
Começar
Se comprimento (aone) <comprimento (Atwo), então
Max: = Comprimento (aone)
outro
Max: = comprimento (Atwo);
para i: = 1 a max fazer
Começar
se aone [i] <> atwo [i] então
Quebrar;
fim;
Resultados: = i;
fim;
classe função tString.getcharnum (adstring: string; achar: char): número inteiro;
var
I: Inteiro;
Começar
Resultados: = 0;
para i: = 1 a comprimento (adstring)
Começar
Se adiar [i] = achar então
Inc (resultado);
fim;
fim;
Classe Procedimento TString.GetAllWordWithall (Avalue, Aseparator: String;
Astringlist: TStrings);
var
tmpi: número inteiro;
tmppos: número inteiro;
Começar
Se AstringList = nil então
AstringList: = tStringList.create;
tmppos: = 0;
enquanto comprimento (Avalue)> 0 do
Começar
para tmpi: = 1 a comprimento (avaliação)
Começar
tmppos: = POS (Avalue [tmppos], asseparator);
Se tmppos> 0 então
Começar
AstringList.add (cópia (Avalue, 1, tmppos - 1));
AstringList.add (cópia (Avalue, tmppos, 1));
Delete (Avalue, 1, TMPPOs);
Quebrar;
fim
fim;
fim;
fim;
classe função tString.TolowerCase (adstring: string): string;
Começar
Resultado: = minúsculo (adstring);
fim;
Classe function tString.TOUPPERCASE (Astring: String): String;
Começar
Resultado: = Uppercase (Astring);
fim;
Classe function tString.IndexOF (Astring, Asubstring: String): Integer;
Começar
Resultado: = pos (asubstring, adstring);
fim;
Classe function tString.ZeroToint (Astring: String): Inteiro;
Começar
Se TRIM (Astring) = '' então
Adstring: = '0';
Resultado: = strtoint (adstring);
fim;
Classe function tString.Zerotofloat (Astring: String): Double;
Começar
Se TRIM (Astring) = '' então
Astring: = '0,0';
Resultado: = strtofloat (adstring);
fim;
Função de classe TString.Sametext (Astring, Astring1: String): Boolean;
Começar
Resultado: = sysutils.sametext (adstring, adstring1);
fim;
Classe function tString.versever (adstring: string): string;
Começar
Resultado: = revertestring (adstring);
fim;
classe função tString.isValidip (const s: string): boolean;
var
J, I: Inteiro;
Ltmp: string;
Começar
Resultado: = true;
Ltmp: = acabamento (s);
para i: = 1 a 4 comece
j: = strTointDef (busca (ltmp, '.'), -1);
Resultado: = resultado e (j> -1) e (j <256);
Se não resulta, então comece
Quebrar;
fim;
fim;
fim;
Classe function tString.Zerotostr (Astring: String): String;
Começar
Se TRIM (Astring) = '' então
Resultado: = '0'
outro
Resultado: = adstring;
fim;
classe função tString.fillstring (achar: char; alngth: integer): string;
var
I: Inteiro;
Começar
Resultados: = '';
para i: = 1 para todo o tempo // iterate
Começar
Resultado: = resultado + achar;
fim;
fim;
classe função tString.stuffString (const atext: string; astart,
Alngth: cardeal;
Começar
Resultado: = strutils.stuffString (ATEXT, ASTART, ALMENGLE, ASUBTEXT);
fim;
Classe função tString.getNextString (var SourCestring: String;
Asplitchar: string): string;
var
tmppos: número inteiro;
Começar
tmppos: = POS (Asplitchar, Sourcestring);
Se tmppos = 0 então
Começar
Resultado: = SourCestring;
Sourcestring: = ''
fim
outro
Começar
Resultado: = tString.Left (Sourcestring, tmppos -1);
Delete (Sourcestring, 1, tmppos);
fim;
fim;
{Tinteger}
Classe function tinteger.inttoStr (AINTEGER: INTERGER): String;
Começar
Resultado: = sysutils.inttostr (AINTEGER);
fim;
Função de classe tinteger.hashcode (AINTEGER: INTERGER): INTEGER;
Começar
Resultado: = AINTEGER;
fim;
Classe function tinteger.inttoStr (AINTEGER: INT64): String;
Começar
Resultado: = sysutils.inttostr (AINTEGER);
fim;
Função de classe tinteger.isValidInt (adstring: string): boolean;
Começar
Resultado: = true;
tentar
Strtoint (adstring);
exceto
Resultado: = false;
fim;
fim;
Classe function tinteger.isValidInt64 (adstring: string): boolean;
Começar
Resultado: = true;
tentar
Strtoint (adstring);
exceto
Resultado: = false;
fim;
fim;
função de classe tinteger.maxint: integer;
Começar
Resultado: = System.maxint;
fim;
função de classe tinteger.maxlongint: integer;
Começar
Resultado: = System.MaxlongInt;
fim;
Classe function tinteger.inttobin (ainteger: cardeal): string;
var
I: Inteiro;
Começar
SetLength (resultado, 32);
para i: = 1 a 32 fazer
Começar
if ((ainteger shl (i-1)) shr 31) = 0 Então
Resultado [i]: = '0'
outro
Resultado [i]: = '1';
fim;
fim;
Classe function tinteger.inttohex (AINTEGER: INTERGER): String;
Começar
Resultado: = sysutils.inttohex (AINTEGER, 0);
fim;
Função de classe Tinteger.HexToint (Astring: String): Inteiro;
Começar
Se tString.left (adstring, 1) = '$' então
Resultado: = strtoint (adstring)
outro
Resultado: = strtoint ('$' + adstring);
fim;
Classe function tinteger.makeserialNo (AINTEGER, Adigit: Integer): String;
var
tmpstr: string;
I: Inteiro;
Começar
tmpstr: = '';
para i: = 0 para adigitar - 1 fazer // iterate
Começar
tmpstr: = tmpstr + '0';
fim;
Resultado: = formatfloat (tmpstr, Ainteger);
fim;
{Tfloat}
Função de classe tfloat.floattomoney (const valor: duplo; redonda: boolean): string;
Começar
// o valor é arredondado por padrão
fim;
classe função tfloat.isvalidfloat (adstring: string): boolean;
Começar
Resultado: = true;
tentar
Strtofloat (adstring);
exceto
Resultado: = false;
fim;
fim;
função de classe tfloat.maxdouble: duplo;
Começar
Resultado: = 1.7e+308;
fim;
função de classe tfloat.maxExtended: estendido;
Começar
Resultado: = 1.1e+4932;
fim;
função de classe tfloat.mindouble: duplo;
Começar
Resultado: = 5.0E-324;
fim;
função de classe tfloat.minextended: estendido;
Começar
Resultados: = 3.4E-4932;
fim;
função de classe tfloat.sameValue (const a, b: single;
Epsilon: solteiro): booleano;
Começar
Resultado: = Math.sameValue (A, B, Epsilon);
fim;
função de classe tfloat.sameValue (const a, b: duplo;
Epsilon: duplo): booleano;
Começar
Resultado: = Math.sameValue (A, B, Epsilon);
fim;
função de classe tfloat.sameValue (const a, b: estendido;
Epsilon: estendido): booleano;
Começar
Resultado: = Math.sameValue (A, B, Epsilon);
fim;
{Tboolean}
Função de classe TBoolean.Booltostr (Aboolean: Boolean): String;
Começar
Se ABOOLEAN, então
Resultado: = 'True'
outro
Resultado: = 'false';
fim;
função de classe tboolean.strtoBool (adstring: string): boolean;
Começar
Se uppercase (adstring) = 'true' então
Resultado: = true
outro
Resultado: = false;
fim;
fim.