Page 1 of 1
determine SDAC version
Posted: Mon 03 Oct 2005 11:20
by Ludek
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?

Posted: Mon 03 Oct 2005 14:59
by Ikar
You can't do this at compile time
Posted: Mon 03 Oct 2005 16:19
by Ludek
Do you plan to include such feature in next versions? I think it shouldn't be complicated... Or at least an other constant/variable, that would be easily comparable without complicated parsing...
Posted: Tue 04 Oct 2005 09:26
by Ikar
Please describe in details what you need it for.
Posted: Tue 04 Oct 2005 11:20
by 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.
Posted: Tue 04 Oct 2005 14:30
by Ludek
I really don't like writing complex algorithms like this
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;
if not absolutely necessary
I would like following:
Code: Select all
if SDACVersionNum < 3550017 then ...
do you see the difference?

Posted: Thu 06 Oct 2005 08:23
by Ikar
Do you distribute components, based on SDAC? Or is there another purpose?
Posted: Tue 25 Oct 2005 10:59
by Ludek
No, I don't distribute components. As already many times said - I simply want to be sure, that nobody in our company compiles sources with a wrong version of SDAC (for examples, if the programmer comes from holiday, he sees immediately, he has to update SDAC).
Posted: Tue 01 Nov 2005 08:52
by Ikar
We will think about adding such variable. But it looks hardly necessary.