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

📄 sample5.dpr

📁 用来测试任何pcsc兼容读卡器
💻 DPR
字号:
{$APPTYPE CONSOLE}
program sample5;
uses Windows,PCSCClasses,SysUtils,VASBase;
var
 a,b,c:TBuffer;
begin
 writeln('Buffer use sample',#10);
 a:=TBuffer.Create;
 b:=TBuffer.Create;
 c:=TBuffer.Create;
 try
  if Assigned(a) and Assigned(b) and Assigned(c)  then
  begin
   a.str:='VAS';
   writeln('A.str=''',a.str,'''  A.hex=''',a.hex,''' A.capacity=',a.capacity,' A.len=',a.len,#10);
   a.str:='';
   writeln('A.str=''',a.str,'''  A.hex=''',a.hex,''' A.capacity=',a.capacity,' A.len=',a.len,#10);
   b.hex:='504353,43,20,52,65,61 64 65 72';
   writeln('B.str=''',b.str,'''  B.hex=''',b.hex,''' B.capacity=',b.capacity,' B.len=',b.len,#10,#10);
   c.assign(b);
   writeln('C.str=''',c.str,''' C.capacity=',c.capacity,' C.len=',c.len,#10);
   try
    c.hex:=c.str;
   except
    on e:exception do writeln(E.Message);
   end;
   writeln('C.str=''',c.str,''' C.capacity=',c.capacity,' C.len=',c.len,#10);
//   c.Assign(b);
   try
    c[0]:=$51;
   except
    on e:exception do writeln(E.Message);
   end;
   try
    c.len:=3;
    c[0]:=$51;
    c[1]:=$44;
    c[2]:=$54;
   except
    on e:exception do writeln(E.Message);
   end;
   writeln('C.str=''',c.str,''' C.capacity=',c.capacity,' C.len=',c.len,#10);
  end;
  writeln('Press ENTER to finish...');
  readln; 
 finally
  a.Free;
  b.Free;
  c.Free;
 end;
end.

⌨️ 快捷键说明

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