Fortran Coder

查看: 1554|回复: 2

[通用算法] 运算过程中提示操作符不当有待改善01

[复制链接]

50

帖子

24

主题

0

精华

大师

F 币
1148 元
贡献
475 点
发表于 2022-10-25 16:50:56 | 显示全部楼层 |阅读模式
运算过程中提示操作符不当有待改善01
程序段如下:
   !***********************************************************************
Subroutine hbfds(n, w, c, m, kk, k, x, jdim)

!c*********************************************************************72
!c
!cc HBFDS performs a best-fit decreasing heuristic.
!c
!c for local use with current solution given.
!c time complexity  o(n**2) .
!c
  Integer w(jdim), c, k(jdim), x(jdim), kk(jdim)
  Do j = 1, m
    k(j) = kk(j)
  End Do

  Do i = 1, n
!c
!c insert the next item.
!c
    iwi = w(i)
    minres = c
    Do j = 1, m
      kres = k(j) - iwi
      If (kres<0) Goto 20
      If (kres>=minres) Goto 20
      minres = kres
      jm = j
    20 End Do
3366|    If (minres . lt . c) Goto 30
!c
!c initialize a new bin.
!c
    m = m + 1
    k(m) = c - iwi
    x(i) = m
    Goto 40
!c
!c insert the item  into an old bin.
!c
    30 k(jm) = k(jm) - iwi
    x(i) = jm
  40 End Do

  Return
End Subroutine hbfds
!***********************************************************************
3366 |     If (minres . lt . c) Goto 30      |                     1Error: The name ‘lt’ cannot be used as a defined operator at (1) main.f90:3468:35:
  求助??!  谢谢!   

81

帖子

0

主题

0

精华

专家

F 币
471 元
贡献
232 点

规矩勋章新人勋章元老勋章

QQ
发表于 2022-10-25 17:18:27 | 显示全部楼层
.lt. 中间不能有空格,即不能写作 . lt .

评分

参与人数 1F 币 +1 收起 理由
fcode + 1 正解!

查看全部评分

彼岸,有永恒的守候...

50

帖子

24

主题

0

精华

大师

F 币
1148 元
贡献
475 点
 楼主| 发表于 2022-10-26 16:55:36 | 显示全部楼层
谢谢
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 极速注册

本版积分规则

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

GMT+8, 2024-3-28 19:54

Powered by Tencent X3.4

© 2013-2024 Tencent

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