[Info-vax] Simple Pascal question
Arne Vajhøj
arne at vajhoej.dk
Thu Sep 5 13:30:44 EDT 2024
On 8/4/2024 7:45 PM, Arne Vajhøj wrote:
> On 8/4/2024 5:53 PM, John Reagan wrote:
>> Why didn't I do this?
>>
>> I did think about it, but what about more complicated expression.
>>
>> x := 1.5 * 1.5;
>>
>> Is that multiply an IEEE S_float multiply or VAX F_float multiply?
>> Logically, it would have been an IEEE S_float multiply and then
>> converted to VAX F_float. I didn't think it was a problem that needed
>> to be solved.
>
> I was sort of expecting literals to be of the type determined by
> suffix and compiler switch and that mixed expressions would be
> converted similar to various other mixed expressions.
>
> That was not the case.
>
> Probably not worth spending time on "fixing". It must be
> an extremely rare case.
And in case someone wonder.
I was trying to have one file instead of three files to test
all FP's.
module demov(input, output);
[global]
function f_check(var v : f_float) : integer;
begin
v := v + %f_float 0.001;
f_check := 1;
end;
[global]
function d_check(var v : d_float) : integer;
begin
v := v + %d_float 0.001;
d_check := 1;
end;
[global]
function g_check(var v : g_float) : integer;
begin
v := v + %g_float 0.001;
g_check := 1;
end;
[global]
function s_check(var v : s_float) : integer;
begin
v := v + 0.001;
s_check := 1;
end;
[global]
function t_check(var v : t_float) : integer;
begin
v := v + 0.001;
t_check := 1;
end;
end.
:-)
Arne
More information about the Info-vax
mailing list