美文网首页
FORTRAN associated

FORTRAN associated

作者: 咆哮红颜 | 来源:发表于2015-12-20 17:17 被阅读584次

在/src/io/calc_df.F90中,有许多:

DO WHILE(ASSOCIATED(current))

下面整理一些有关associated的用法。


简单的说associated返回一个逻辑值,用于指针的语法。

ASSOCIATED

Inquiry Intrinsic Function (Generic):

Returns the association status of its pointer argument or indicates whether the pointer is associated with the target.

Syntax

result = ASSOCIATED (pointer [, target])

pointer (Input)

Must be a pointer (of any data type).

target (Optional; input)

Must be a pointer or target.

The pointer (in pointer or target) must not have an association status that is undefined. ???

Results:

The result is a scalar of type default logical.

  1. If only pointer appears, the result is true if it is currently associated with a target; otherwise, the result is false.
  2. If target also appears and is a target, if pointer is currently associated with target; otherwise, the result is false.
  3. If target is a pointer, the result is true if both pointer and target are currently associated with the same target; otherwise, the result is false.
  4. If either pointer or target is disassociated, the result is false.

如果上面的英文对你来说还不够的话,下面再贴上一个中文的解释(个人感觉更看不懂)。
fortran中有关指针的用法总结(此文来自科学网何林博客)

相关文章

  • FORTRAN associated

    在/src/io/calc_df.F90中,有许多: DO WHILE(ASSOCIATED(current)) ...

  • iOS Associated Objects

    Associated Objects(关联对象)或者叫做关联引用(Associated References),是...

  • Associated の 对象关联

    参照 Associated Objects 的实现原理 进行理解 Associated Objects 一般用于以...

  • Fortran基础知识回顾

    一、Fortran设计基础 Fortran是不区分大小写的语言。 书面格式包括:自由格式(Free Format,...

  • UniversalLink Associated Domains

    UniversalLink Associated Domains

  • Fortran

    Fortran Coder 团队制作的视频特别适合自学和进阶的小伙伴:http://v.fcode.cn/还有qq...

  • 2018-04-16

    Fortran Best Practices ====================== .. highligh...

  • Runtime系列3--给category添加属性

    Associated Objects的作用 Associated Objects的作用一般有如下三种: 为系统类添...

  • 学习cmake

    c++与fortran混合编程时的cmake 在fortran和c++混合编程时,使用cmake工具参考link[...

  • GPOPSIM软件使用

    软件介绍软件介绍 软件用途软件用途 语言:Fortran 90 输入文件 一个TXT文本文件,Fortran语言风...

网友评论

      本文标题:FORTRAN associated

      本文链接:https://www.haomeiwen.com/subject/jrkmhttx.html