Fortran Coder

查看: 1623|回复: 1
打印 上一主题 下一主题

[通用算法] 如何判断两个字符串完全相等?

[复制链接]

159

帖子

2

主题

1

精华

大师

Vim

F 币
961 元
贡献
469 点

规矩勋章

楼主
发表于 2023-2-26 17:20:47 | 显示全部楼层
是的,这是Fortran标准规定的

For a character relational intrinsic operation, the operands are compared one character at a time in order, beginning with the first character of each character operand. If the operands are of unequal length, the shorter operand is treated as if it were extended on the right with blanks to the length of the longer operand.  


如果长度不同,会自动扩展长度较短的那个,补齐空格

https://community.intel.com/t5/I ... parisons/m-p/798324
您需要登录后才可以回帖 登录 | 极速注册

本版积分规则

捐赠本站|Archiver|关于我们 About Us|小黑屋|Fcode ( 京ICP备18005632-2号 )

GMT+8, 2024-5-5 08:51

Powered by Tencent X3.4

© 2013-2024 Tencent

快速回复 返回顶部 返回列表