Or do I need to parse the SDACVersion string variable at run-time?
determine SDAC version
-
Ludek
determine SDAC version
Is there a way to determine SDAC version at compile time and, if the version is too low, generate an error? Something like {$IF SDACVer < 3550017} ... {$ENDIF}
Or do I need to parse the SDACVersion string variable at run-time?
Or do I need to parse the SDACVersion string variable at run-time?
-
Ludek
-
Ludek
I simply want to be sure, that nobody compiles the sources and uses the program compiled with too old SDAC version - if some important bug in SDAC gets corrected, each workstation that compiles the sources will be forced to update SDAC. And I don't also want to force to update all workstations, when the corrected bug wasn't important.
Example: I Want to let compile our current sources with SDAC 3.55.0.17 or higher, never with 3.55.0.16 or lower.
Example: I Want to let compile our current sources with SDAC 3.55.0.17 or higher, never with 3.55.0.16 or lower.
-
Ludek
I really don't like writing complex algorithms like this
if not absolutely necessary
I would like following:
do you see the difference? 
Code: Select all
function SDACVersionHighEnough: boolean;
const
ReqSDACVer: array [0..3] of integer = (3, 55, 0, 17);
var
currindex: integer;
currnumber: integer;
strpos: integer;
begin
currindex := 0;
currnumber := 0;
for strpos := 1 to length(SDACVersion) do begin
case SDACVersion[strpos] of
'.': begin
assert(currindex ReqSDACVer[currindex] then begin
result := true;
exit;
end else if currnumber = ReqSDACVer[currindex];
end;
I would like following:
Code: Select all
if SDACVersionNum < 3550017 then ...
-
Ludek