Lazars常用函数
-
var
-
i: Integer;
-
Row: String;
-
Parts: TStringArray;
-
S1, S2, S3, S4: String;
-
begin
-
Row := '51,40,45,44,44,40,';
-
Parts := Row.Split(',');
-
S1 := Parts[0];
-
S2 := Parts[1];
-
S3 := Parts[2];
-
S4 := Parts[3];
-
end;
High
Return highest index of open array or enumerated.
example:
for i:= 0 to high(TRoutingInfo) do
字符串函数:
1.function StrToIntDef(const S: string;Default: LongInt):LongInt;
把字符串转化为整数值,带有默认值。返回的LongInt即为S转化后的整数值,如S=20,函数的返回值即为20
StrToIntDef will convert a string to an integer. If the string contains invalid characters or has an invalid format, then Default is returned.
2.
StringOfChar
返回一个字符,重复N次
Return a string consisting of 1 character repeated N times.
如: rec.Name := StringOfChar(Char(65 + Random(26)), 3);
3.
Low
4.
write
Write(id_simo: 10, et_nomen: 10, et_modeop: 10, et_modeop_pere: 10);
id_simo: 10,10为id_simo所占长度