delphi一句话帮助终[1]

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

本文简介:选择自 u2m 的 blog

1.       产生随机密码(应该比较有用)

   function createpass:string;

const

      max_len=10;

var

      i: integer;

      s: string;

begin

      randomize;

      s:='abcdefghijklmnopqrstuvwxyz'+'abcdefghijklmnopqrstuvwxyz'+ '0123456789';

      result := '';

      for i := 0 to max_len-1 do

      begin

        result := result + s[random(length(s)-1)+1];

      end;

end;

2.       十进制数字转换成罗马数字

   function dectoroman(idecimal: longint): string;

const

本文关键:delphi 技巧
  相关方案
Google
 

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

go top