Przeglądaj źródła

* fixed compilation

git-svn-id: trunk@8784 -
Jonas Maebe 18 lat temu
rodzic
commit
1c8d0eef9b
1 zmienionych plików z 23 dodań i 21 usunięć
  1. 23 21
      tests/webtbs/tw9919.pp

+ 23 - 21
tests/webtbs/tw9919.pp

@@ -1,21 +1,23 @@
-type
-  TForm1 = class
-    function crash(n:integer):real;
-  end;
-
-function TForm1.crash(n:integer):real;
-begin
-  case n of
-  0: Result:=0;
-  1..100: Result:=crash(n-1)+crash(n-1);
-  end;
-end;
-
-var
-  f : TForm1;
-
-begin
-  f:=TForm1.create;
-  writeln(f.crash(15));
-  f.Free;
-end.
+{$mode objfpc}
+
+type
+  TForm1 = class
+    function crash(n:integer):real;
+  end;
+
+function TForm1.crash(n:integer):real;
+begin
+  case n of
+  0: Result:=0;
+  1..100: Result:=crash(n-1)+crash(n-1);
+  end;
+end;
+
+var
+  f : TForm1;
+
+begin
+  f:=TForm1.create;
+  writeln(f.crash(15));
+  f.Free;
+end.