Browse Source

* bugfix 2001

carl 23 years ago
parent
commit
f61a723302
1 changed files with 24 additions and 0 deletions
  1. 24 0
      tests/webtbs/tw2001.pp

+ 24 - 0
tests/webtbs/tw2001.pp

@@ -0,0 +1,24 @@
+{ %version=1.1}
+{ Source provided for Free Pascal Bug Report 2001 }
+{ Submitted by "Gene Hardesty" on  2002-06-09 }
+{ e-mail: [email protected] }
+program qwrdbug;
+const
+     terabytes=1024*1024*1024*1024;             // Compiler can't do math
+     terabytes1:qword=1024*1024*1024*1024;      // Typing doesn't work
+     terabytes2=1099511627776;                  // Thx to CALC for the number
+var
+     terabytes3:qword;
+     terabytes4:int64;                          // Just for comparison
+
+begin
+     terabytes3:=qword (terabytes2);          // This doesn't work either.
+     terabytes3:=qword (1099511627776);       // This doesn't work too.
+     terabytes3:=1024*1024*1024*1024;
+     terabytes4:=1024*1024*1024*1024;
+     writeln (terabytes);                       // Displays 0
+     writeln (terabytes1);                      // Also displays 0
+     writeln (terabytes2:2);                  // The compiler treats it as a REAL
+     writeln (terabytes3);                      // Displays 0
+     writeln (terabytes4);                      // Also displays 0
+end.