Delphi 函数参考[4]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 hiyaolee 的 blog

      例子 spinedit2.value := soundexint(edit1.text, spinedit1.value);
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function decodesoundexint(avalue: integer): string; $[strutils.pas
      功能 返回探测整数的解码
      说明 decodesoundexint(soundexint('hello')) 相当于 soundex('hello')
      参考 <null>
      例子 edit2.text := decodesoundexint(spinedit2.value);
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function soundexword(const atext: string): word; $[strutils.pas
      功能 返回探测文字数值
      说明 没有参数alength已经固定为4
      参考 <null>
      例子 spinedit2.value := soundexword(edit1.text);
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function decodesoundexword(avalue: word): string; $[strutils.pas
      功能 返回探测文字数值的解码
      说明 decodesoundexword(soundexword('hello')) 相当于 soundex('hello')
      参考 <null>
      例子 edit2.text := decodesoundexword(spinedit2.value);
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function soundexsimilar(const atext, aother: string; alength:
      tsoundexlength = 4): boolean; $[strutils.pas
      功能 返回两个字符串的探测字符串是否相同
      说明 result := soundex(atext, alength) = soundex(aother, alength)
      参考 <null>
      例子 checkbox1.checked := soundexsimilar(edit1.text, edit2.text,
      spinedit1.value);
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function soundexcompare(const atext, aother: string; alength:
      tsoundexlength = 4): integer; $[strutils.pas
      功能 返回比较两个字符串的探测字符串的结果
      说明 result := ansicomparestr(soundex(atext, alength), soundex(aother,
      alength))
      参考 function sysutils.ansicomparestr
      例子 spinedit2.value := soundexcompare(edit1.text, edit2.text,
      spinedit1.value);
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function soundexproc(const atext, aother: string): boolean;
      $[strutils.pas
      功能 调用soundexsimilar返回两个字符串的探测字符串是否相同
      说明 系统变量ansiresemblesproc的默认值
      参考 function strutils.ansiresemblestext
      例子 [var ansiresemblesproc: tcomparetextproc = soundexproc;]
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function newstr(const s: string): pstring; deprecated; $[sysutils.pas
      功能 返回一个新的字符串指针地址
      说明 字符串s为空时返回nullstr
      参考 procedure system.new
      例子
      ////////begin newstr,disposestr
      procedure tform1.button1click(sender: tobject);
      var
      p: pstring;
      begin
      p := newstr(edit1.text);
      edit2.text := p^;
      disposestr(p);
      end;
      ////////end newstr,disposestr
      ━━━━━━━━━━━━━━━━━━━━━
      首部 procedure disposestr(p: pstring); deprecated; $[sysutils.pas
      功能 释放字符串指针p资源
      说明 配合函数newstr使用
      参考 procedure system.dispose
      例子 <如上参见,如下参见>
      ━━━━━━━━━━━━━━━━━━━━━
      首部 procedure assignstr(var p: pstring; const s: string); deprecated;
      $[sysutils.pas
      功能 将字符串s更新给字符串指针p
      说明 更新值时会释放以前字符串指针的资源
      参考 function sysutils.newstr;function sysutils.disposestr
      例子
      ////////begin assignstr
      procedure tform1.button1click(sender: tobject);

本文关键:Delphi 函数参考
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top