testcaseifformat.out

来自「格式化源码的最新板」· OUT 代码 · 共 47 行

OUT
47
字号
unit testCaseIfFormat;

interface

type
  TRecord = record
    bar1: integer;
    bar2: integer;
  end;

implementation

uses SysUtils;

function foo1(const pi: integer): boolean;
begin
  Result := (pi mod 2) = 0;
end;

function Foo(Bar: TRecord): word;
begin
  case bar.bar1 of
    1: if not foo1(bar.bar2) then
        Result := 31
      else
        Result := 32;
    2: if not foo1(bar.bar2) then
        Result := 28
      else
        Result := 29;
    3: Result := 7;
    4: Result  := 4;
    5: Result  := 9;
    6: Result  := 6;
    7: Result  := 11;
    8: Result  := 8;
    9: Result  := 5;
    10: Result := 10;
    11: Result := 7;
    12: Result := 12;
    else
      raise Exception.Create('message');
  end;
end;

end.

⌨️ 快捷键说明

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