简体   繁体   English

Fortran 77 中的“X”和“Z”在表示十六进制时的差异

[英]'X' and 'Z' difference in Fortran 77 when representing for hex

I am working on some legacy code.我正在处理一些遗留代码。 I saw two kinds of Integers:我看到了两种整数:

z'ffffffff' and 'ffffffff'x

from https://docs.oracle.com/cd/E19957-01/805-4939/c4000413626f/index.html X or Z are for hexadecimal.来自https://docs.oracle.com/cd/E19957-01/805-4939/c4000413626f/index.html X 或 Z 为十六进制。 So what's the difference between z'ffffffff' and 'ffffffff'x ?那么z'ffffffff' and 'ffffffff'x之间有什么区别?

Both were accepted as compiler extensions by the (pre-Fortran 90) compiler that was used to compile your code.两者都被用于编译代码的(Fortran 90 之前的)编译器接受为编译器扩展。

In Fortran 90 and later only the z'0000' syntax is allowed.在 Fortran 90 及更高版本中,只允许使用z'0000'语法。 The standard revision differ in the context where exactly they are allowed to be placed.标准修订版在允许放置它们的上下文中有所不同。

The '0000'x is completely non-standard. '0000'x是完全非标准的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM