Euklid hat geschrieben:Version 1.0 der GNURZ-Arithmetik veröffentlicht
Die GNURZ hat nun ein stabiles Stadium erreicht.
Von einem stabilen Stadium erwarte ich eigentlich, daß man ohne Warnungen kompilieren kann und offensichtliche Bugs beseitigt sind. Beides ist nicht der Fall. Für das fast minimale Demopromamm
Code: Alles auswählen
program t_g1;
{$mode objfpc}{$H+}
uses gnurz;
var
GO: TGnurz;
a, b, c: GNZTyp;
begin
GO := TGnurz.create;
a := GO.StrToGNZTyp('2');
b := GO.StrToGNZTyp('3');
c := GO.GNZadd(a,b);
writeln('a=',GO.GNZTypToStr(a), ', prim: ', GO.GNZIstPrim(a));
writeln('b=',GO.GNZTypToStr(b), ', prim: ', GO.GNZIstPrim(b));
writeln('c=a+b=',GO.GNZTypToStr(c), ', prim: ', GO.GNZIstPrim(c));
end.
erhält man während des Kompilierens:
Code: Alles auswählen
Free Pascal Compiler version 2.2.4 [2009/04/10] for i386
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Win32 for i386
Compiling t_g1.pas
Compiling gnurz.pas
gnurz.pas(223,5) Note: Local variable "laenge" not used
gnurz.pas(854,13) Note: Local variable "Ueberschlag" not used
gnurz.pas(991,27) Warning: Mixing signed expressions and longwords gives a 64bit result
gnurz.pas(1002,30) Warning: Mixing signed expressions and longwords gives a 64bit result
gnurz.pas(1003,36) Warning: Mixing signed expressions and longwords gives a 64bit result
gnurz.pas(1052,27) Warning: Mixing signed expressions and longwords gives a 64bit result
gnurz.pas(1063,30) Warning: Mixing signed expressions and longwords gives a 64bit result
gnurz.pas(1064,36) Warning: Mixing signed expressions and longwords gives a 64bit result
gnurz.pas(919,10) Note: Local variable "testt3" not used
gnurz.pas(921,20) Note: Local variable "testt" not used
gnurz.pas(921,26) Note: Local variable "testt2" not used
gnurz.pas(921,33) Note: Local variable "testt4" not used
gnurz.pas(921,40) Note: Local variable "testt5" not used
gnurz.pas(1145,67) Warning: Mixing signed expressions and longwords gives a 64bit result
gnurz.pas(1156,27) Warning: Mixing signed expressions and longwords gives a 64bit result
gnurz.pas(1167,30) Warning: Mixing signed expressions and longwords gives a 64bit result
gnurz.pas(1168,36) Warning: Mixing signed expressions and longwords gives a 64bit result
gnurz.pas(1210,27) Warning: Mixing signed expressions and longwords gives a 64bit result
gnurz.pas(1221,30) Warning: Mixing signed expressions and longwords gives a 64bit result
gnurz.pas(1222,36) Warning: Mixing signed expressions and longwords gives a 64bit result
gnurz.pas(1093,10) Note: Local variable "testt3" not used
gnurz.pas(1094,36) Note: Local variable "LaengeErg" not used
gnurz.pas(1096,20) Note: Local variable "n_erg" not used
gnurz.pas(1097,5) Note: Local variable "Erg" not used
Linking t_g1.exe
1627 lines compiled, 1.3 sec , 52336 bytes code, 1688 bytes data
13 warning(s) issued
11 note(s) issued
und folgende Ergebnisse (d.h. schon bei den ersten beiden Primzahlen versagt die Library):
Gruß Frank