[Info-vax] cast REAL*16 to constant 18446744073709551616
Jan-Erik Söderholm
jan-erik.soderholm at telia.com
Mon Mar 15 14:18:16 EDT 2021
Den 2021-03-15 kl. 19:08, skrev HCorte:
> A segunda-feira, 15 de março de 2021 à(s) 17:48:05 UTC, Arne Vajhøj escreveu:
>> On 3/15/2021 1:09 PM, HCorte wrote:
>>> Hi trying to cast REAL*16 to the constant 18446744073709551616 that is 9 bytes length how to do it?
>>>
>>> tried (http://www.cs.uwm.edu/classes/cs151/Bacon/Lecture/HTML/ch06s09.html):
>>> REAL*16 OVER8BYTES
>>> PARAMETER (OVER8BYTES = 18446744073709551616e)
>>>
>>> %F90-E-ERROR, The decimal constant was too large when converting to an integer, and overflow occurred. [184
>>> 46744073709551616]
>> Does 18446744073709551616q0 work?
>>
>> Arne
>
> tried with D0:
>
> REAL*16 OVER8BYTES
> PARAMETER (OVER8BYTES = 18446744073709551616D0)
>
> and worked
>
Or q0 :
! program hello_test
program hello_test
REAL*16 OVER8BYTES
PARAMETER (OVER8BYTES = 18446744073709551616q0)
print *, 'Hello'
print *, OVER8BYTES
end program hello_test
$ fort test
$ link test
$ r test
Hello
18446744073709551616.0000000000000
$
More information about the Info-vax
mailing list