Recent

Author Topic: I just finished coding a source code beautifier...Here is the result  (Read 886 times)

Ten_Mile_Hike

  • Full Member
  • ***
  • Posts: 140
Code: Text  [Select][+][-]
  1.  Yes; it compiles and runs I call it "The Uglifier"  
  8-) >:D 8-)
Code: Pascal  [Select][+][-]
  1.  
  2.                                 unit Unit1;      
  3.                    {$mode objfpc}{$H+} interface uses
  4.          Classes, SysUtils, Forms, Controls, Graphics, Dialogs,
  5.      StdCtrls; type  { TForm1 }  TForm1 = class(TForm)   B1:TButton;
  6.          procedure B1Click(Sender:TObject); private public end;
  7.             var  Form1: TForm1;  implementation  {$R *.lfm}
  8.                {TForm1}procedure TForm1.B1Click(Sender:
  9.                        TObject); begin B1.Caption:=
  10.                          'Hello World'; end; end.
  11.  
« Last Edit: May 13, 2024, 09:04:29 am by Ten_Mile_Hike »
When any government, or any church for that matter, undertakes to say to its subjects, This you may not read, this you
must not see, this you are forbidden to know, the end result is tyranny and oppression no matter how holy the motives.

Robert A. Heinlein

TRon

  • Hero Member
  • *****
  • Posts: 4377
That was a popular form of formatting and reminds me of this.

Can't say that I have seen many implementations for Pascal though
Today is tomorrow's yesterday.

BildatBoffin

  • Jr. Member
  • **
  • Posts: 50
Beautiful, that reminds me a header translation I've seen recently. The translator generated comma like at column 200... At some point I was like "what is this syntax ? That is illegal, I do not remember this grammar rule..."

Code: D  [Select][+][-]
  1. extern int XmbTextEscapement(
  2.     XFontSet                                            /* font_set                                                     */,
  3.     char*                                               /* text                                                         */,
  4.     int                                                 /* chars_text                                                   */
  5. );

 

TinyPortal © 2005-2018