On 08/01/19 17:34, Ryan Joseph wrote:
I made a little utility function which works in most cases but I don’t think
it’s correct and more importantly this function probably already exists in the
compiler.
function compare_orddef_by_range(param1,param2:torddef): boolean;
var
orddef1,orddef2:tdef;
begin
range_to_type(param1.low,param1.high,orddef1);
range_to_type(param2.low,param2.high,orddef2);
result:=compare_defs(orddef1,orddef2,nothingn)>=te_convert_l1;
end;
Is there an existing function for this or a better way to do it?
defutils.testrange
Jonas
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal