Hi, folks --
We're using D5. The Delphi help file says that the default calling convention is REGISTER and parameters are passed from left to right.
We're converting a large program which requires this left-to-right processing. However, D5 seems to process right-to-left contrary to the documentation.
An example is given below. If we append ";pascal" to the function definition, all goes well. However, we have miles of code and it would be very easy to miss a function declaration.
Is there a global way to force the left-to-right calling sequence that apparently should be the default but isn't?
Many thanks for your help,
GeorgeWB
Example---------------
Here outputSt is '123' but trackSt is '321'
Appending ";pascal" to "function big_get(a,b,c:string):string;" solves the problem here but is not very practical for our conversion project.
program Test;
var outputSt,trackSt:string;
function little_get(code:string):string;
begin
little_get:=code;
trackSt:=trackSt + code;
end;
function big_get(a,b,c:string):string;
begin
big_get:=concat(a,b,c);
end;
begin
trackSt:='';
outputSt := big_get(little_get('1'),little_get('2'),little_get('3'));
end.
We're using D5. The Delphi help file says that the default calling convention is REGISTER and parameters are passed from left to right.
We're converting a large program which requires this left-to-right processing. However, D5 seems to process right-to-left contrary to the documentation.
An example is given below. If we append ";pascal" to the function definition, all goes well. However, we have miles of code and it would be very easy to miss a function declaration.
Is there a global way to force the left-to-right calling sequence that apparently should be the default but isn't?
Many thanks for your help,
GeorgeWB
Example---------------
Here outputSt is '123' but trackSt is '321'
Appending ";pascal" to "function big_get(a,b,c:string):string;" solves the problem here but is not very practical for our conversion project.
program Test;
var outputSt,trackSt:string;
function little_get(code:string):string;
begin
little_get:=code;
trackSt:=trackSt + code;
end;
function big_get(a,b,c:string):string;
begin
big_get:=concat(a,b,c);
end;
begin
trackSt:='';
outputSt := big_get(little_get('1'),little_get('2'),little_get('3'));
end.