before and after code samples. The code is not meaningful, it only serves to illustrate formatting!

 Before (input to the Jedi Code Format)

 After (Jedi Code Format output)

function FnFred (var piFred :integer) : integer;
var liFr: integer;
 lGlimmer: array [4..12] of Double;
begin
  liFr := piFred;
 Result := 3 + liFr;

 if liFr > 12 then begin
  Result := Result * 2; end;
function FnFred(var piFred: integer): integer;
var 
  liFr:     integer;
  lGlimmer: array [4..12] of double;
begin
  liFr   := piFred;
  Result := 3 + liFr;

  if liFr > 12 then 
  begin
    Result := Result * 2; 
  end;
procedure TestTryProc;
begin

try ShowMessage ('Start'); try ShowMessage ('trying');
try ShowMessage ('still trying'); 
finally ShowMessage ('going...'); end;
except ShowMessage ('except'); end;
finally ShowMessage ('Finally!'); end;

end;
procedure TestTryProc;
begin

  try 
    ShowMessage('Start'); 
    try 
      ShowMessage('trying');
      try 
        ShowMessage('still trying'); 
      finally 
        ShowMessage('going...'); 
      end;
    except 
      ShowMessage('except'); 
    end;
  finally 
    ShowMessage('Finally!'); 
  end;

end;
unit testclasslines;interface type tsomeclass=class class function dink:boolean;end;
implementation class function tsomeclass.dink:boolean;begin result:=false;end;end.
unit testclasslines;

interface 

type 
  tsomeclass = class 
    class function dink: boolean;
  end;

implementation 

class function tsomeclass.dink: boolean;
begin 
  Result := False;
end;

end.
unit testdeclarations;interface const fred_const_1=34;fred_const_two='Fred';gimp='Glump';
mo_money=123.45;pigs_can_fly=false;fred_name:string='Fred!';fred_count:integer=2;
fred_money:currency=234.4;bit_twiddled:integer= $F00F;hex_value:integer= $0BADBEEF;
my_favorite_letter:char=#96;type tstuff=(ethis,ethat,etheother,esomethingelse);tstuffset=
set of tstuff;const mystuff=[ethis,etheother];otherstuff=[ethat,esomethingelse];var fred1:
integer;fredtwo:string;f3:boolean;type tfredproc=procedure(var psfred:integer)of object;
tfredfunction=function(const psfred:string):string;tfluggle=array[1..10]of boolean;tflig=
array[1..12]of integer;var fred3:integer=42;myfluggle:tfluggle=(true,false,true,true,false
,true,false,true,true,false);myflig:tflig=(1,2,3,4,5,6,7,8,9,10,11,12);function fnfred(var
 pifred:integer):integer;function fnfredconst(const psfred:string):string;
unit testdeclarations;

interface 

const 
  fred_const_1             = 34;
  fred_const_two           = 'Fred';
  gimp                     = 'Glump';
  mo_money                 = 123.45;
  pigs_can_fly             = False;
  fred_name: string        = 'Fred!';
  fred_count: integer      = 2;
  fred_money: currency     = 234.4;
  bit_twiddled: integer    = $F00F;
  hex_value: integer       = $0BADBEEF;
  my_favorite_letter: char = #96;
type 
  tstuff    = (ethis, ethat, etheother, esomethingelse);
  tstuffset =
    set of tstuff;
const 
  mystuff    = [ethis, etheother];
  otherstuff = [ethat, esomethingelse];
var 
  fred1:
           integer;
  fredtwo: string;
  f3:      boolean;
type 
  tfredproc     = procedure (var psfred: integer) of object;
  tfredfunction = function (const psfred: string): string;
  tfluggle      = array[1..10] of boolean;
  tflig         =
    array[1..12] of integer;
var 
  fred3:     integer = 42;
  myfluggle: tfluggle = (True, False, True, True, False, True, False, True, True, False);
  myflig:    tflig = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);

function fnfred(var
  pifred: integer): integer;

function fnfredconst(const psfred: string): string;

 


Delphi Code Format