| 215 |
|
|
| 216 |
|
function CompareItems(List: TStringList; I1, I2: Integer): Integer; |
| 217 |
|
var |
| 218 |
– |
fin: Boolean; |
| 219 |
– |
pos: Integer; |
| 218 |
|
s1, s2: String; |
| 219 |
|
begin |
| 222 |
– |
fin := False; |
| 220 |
|
s1 := MidStr(List[I1], 1, PosEx(';', List[I1], 6) - 1); |
| 221 |
|
s2 := MidStr(List[I2], 1, PosEx(';', List[I2], 6) - 1); |
| 222 |
< |
pos := 1; |
| 226 |
< |
Result := 0; |
| 227 |
< |
repeat |
| 228 |
< |
if Ord(s1[pos]) < Ord(s2[pos]) then |
| 229 |
< |
begin |
| 230 |
< |
Result := -1; |
| 231 |
< |
fin := True; |
| 232 |
< |
end |
| 233 |
< |
else if Ord(s1[pos]) > Ord(s2[pos]) then |
| 234 |
< |
begin |
| 235 |
< |
Result := 1; |
| 236 |
< |
fin := True; |
| 237 |
< |
end; |
| 238 |
< |
Inc(pos); |
| 239 |
< |
until fin or (pos > Length(s1)) or (pos > Length(s2)); |
| 240 |
< |
|
| 241 |
< |
if not fin then |
| 242 |
< |
begin |
| 243 |
< |
if pos > Length(s1) then |
| 244 |
< |
Result := -1 |
| 245 |
< |
else |
| 246 |
< |
Result := 1; |
| 247 |
< |
end; |
| 222 |
> |
Result := CompareStr(s1, s2); |
| 223 |
|
end; |
| 224 |
|
|
| 225 |
|
function TAccess_OUP_ADB.GetFilesList(ext: String; pattern: String; |