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

📄 littletest10.out

📁 格式化源码的最新板
💻 OUT
字号:
unit littletest10;

interface

uses SysUtils;

function bintohex(const sbin: string): string;

implementation

uses Math, Classes;

function bintohex(const sbin: string): string;
var
  ex: extended;
begin
  ex := power(2, length('12345'));
  ex := power(2, pos('2', '12345'));
end;

function streamreadln(Source: tstream): string;

  function streamreadchar(Source: tstream): char;
  begin
    if Source.Read(Result, sizeof(char)) = 0 then
      Result := #26;
  end;

var
  bufsize, charsread: integer;
  ch: char;
begin
  bufsize   := 255;
  charsread := 0;
  setlength(Result, bufsize);
  repeat
    ch := streamreadchar(Source);
    case ch of
      #13: if streamreadchar(Source) <> #10 then
          Source.seek(-1, sofromcurrent);
      #10: ch := #13;
      #26:
      begin
        ch := #13;
        Source.seek(0, sofromend);
      end;
      else
      begin
      end;
    end;
  until (ch = #13);
  setlength(Result, charsread);
end;

end.
 

⌨️ 快捷键说明

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