⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uvar.~pas

📁 某计算机学院的毕业设计及论文
💻 ~PAS
字号:
unit uVar;

interface

type
  TXi = record
    ID:string;
    Name:string;
  end;
var
  uXI:array of TXi;
  uNJ:array [0..3] of string;
  uXiCount:integer;
  uZhou:array [0..6] of string;
  uJie:array [1..5] of string;
  function IdtoName(ID:array of TXi;count:integer;IdName:string): string;
implementation
//Result := Copy(Result, 2, Length(Result)-1);
function IdtoName(ID:array of TXi;count:integer;IdName:string): string;
var
  i,a,b:integer;
begin
  Result := '';
  a:=0;
  b:=count-1;
  i := (a+b) div 2;
  while id[i].ID<>IdName do
  begin
    if (a=i)or(b=i)  then
    exit;
    if  IdName > id[i].ID then
      a:=i
    else
      b:=i;
    i := (a+b) div 2;
  end;
  if id[i].ID=IdName then
  Result := id[i].Name;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -