这个就是用来给返回值换一个名字。
比如:

FUNCTION GetSomeData( someinput ) RESULT( ans )ans = f( someinput )end function GetSomeData

如果你不写 result(ans)的话,你必须写成

GetSomeData = f( someinput )

这样看起来不好看。实际上,最重要的应用,在于递归调用函数时,给出最终递归结果。

参考帮助文档:
RESULT
Keyword: Specifies a name for a function result.
Normally, a function result is returned in the function’s name, and all
references to the function name are references to the function result.
However, if you use the RESULT keyword in a FUNCTION statement,
you can specify a local variable name for the function result. In this case, all
references to the function name are recursive calls, and the function name must
not appear in specification statements.
The RESULT name must be different from the name of the function.
Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB

See Also: FUNCTION, ENTRY, RECURSIVE, Program Units and Procedures
Examples
The following shows an example of a recursive function specifying a
RESULT variable:

RECURSIVE FUNCTION FACTORIAL(P) RESULT(L)INTEGER, INTENT(IN) :: PINTEGER LIF (P == 1) THENL = 1ELSEL = P * FACTORIAL(P - 1)END IFEND FUNCTION

The following shows another example:

 recursive function FindSame(Aindex,Last,Used) &           !Recursive(递归的)&  result(FindSameResult)type(card) Lastinteger Aindex, ilogical matched, used(5)if( Aindex > 5 ) thenFindSameResult = .true.returnendif

fortran function的result相关推荐

  1. mysql某元素为空_PHP - MySQL,认为$ result在某些时刻是空的,当时应该有元素

    我有一个带有3个下拉列表的PHP页面.每次使用'onchange'事件时,javascript文档都会将所选值传递给一个php函数,在那里我可以将它们传送到我的mysql数据库并从中得到结果.这个东西 ...

  2. Nested `constexpr` function calls before definition in a constant-expression context

    From what I gather from this answer, a constexpr function's result is not a constant-expression if t ...

  3. Javascript---Immediately-Invoked Function Expression (IIFE)立即执行的函数表达式

    1.一下是几种形式的函数调用: 各种调用的效率:在这编文章中有谈到: http://suqing.iteye.com/blog/1981591 // Either of the following t ...

  4. TypeError: db.collection is not a function

    1.错误描述 F:\nodejs>node insertData.js (node:10028) DeprecationWarning: current URL string parser is ...

  5. Parietal Lobe and Its Function顶叶及其功能

    本文转载内容网址:https://human-memory.net/parietal-lobe/ 本文仅作翻译文章,翻译内容仅供参考,本文遵守CC-BY-SA许可协议将译文发布在个人博客上(79888 ...

  6. java8 Function函数式接口学习

    /*** 表示一个函数,它接收一个参数并且返回一个结果.* 这是一个函数式接口,它有一个重要的方法是apply(Object)* @param <T> 函数的输入类型* @param &l ...

  7. 带符号整数的除法与余数

    带符号整数的除法与余数 Division of Signed Integers 陈硕 giantchen_AT_gmail_DOT_com 最近研究整数到字符串的转换,读到了 Matthew Wils ...

  8. 面向对象软件构造(第2版)-第7章 静态结构: 类 (下)

    7.9 PUTTING EVERYTHING TOGETHER 7.9 组合一切 The previous discussions have introduced the basic mechanis ...

  9. php ajax 概率 转盘,php+jquery实现转盘抽奖 概率可任意调

    转盘抽奖,炫丽的一般是flash做的.不懂flash而又不需要那么炫丽,可以简单的通过jquery来实现.网上教程有很多,跟着做了一下,也贴出来吧.要实现转盘抽奖,有两个关键点,一是让转盘或指针转起来 ...

最新文章

  1. 多节点CDN缓存加速系统wdcdn2.4版本发布(20111213)
  2. thinkphp5项目--企业单车网站(七)
  3. 学习决心书-linux oldboy
  4. html语言表格背景颜色,HTML_HTML表格标记教程(36):表头的背景色属性BGCOLOR,TH标记用于设定表格中某 - phpStudy...
  5. 常考数据结构与算法:平衡二叉树
  6. App设计灵感之十二组精美的天气预报App设计案例
  7. Spring Cloud Gateway 路由转发之After(Before)路由断言工厂使用
  8. 微软Build 2016开发者大会--兑换承诺
  9. Linux 命令出现号(大于号)如何退出
  10. HTTP CORS(HTTP-同源策略)
  11. 如何避免文件被删无法找回的尴尬?
  12. 24小时BTC合约大单成交1.52亿美元 现货大单成交1亿美元
  13. 将稍大文件存储到远程SQL Server服务器
  14. 栈、堆、静态存储区的三分天下
  15. Dynamic CRM 2013学习笔记(四)单据编号及插件批量注册工具
  16. eclipse设置黑色主题
  17. Oracle数据库驱动包ojdbc7.jar,ojdbc8.jar
  18. Python turtle库之QQ呲牙表情的绘制
  19. win10输入法变成繁体字的快捷键
  20. 全球最强大脑在哪里?阿里小蜜算法团队在寻找

热门文章

  1. stm32f407IGT的SYS_TICK嘀嗒定时器(一)
  2. 用纯JavaScript制作扫雷游戏-2
  3. Kaili忘记root密码
  4. 2013年02月24日 元宵夜晚
  5. 听一位老师介绍过的关于兰西奥尼的研究领域
  6. HDR projects 7—HDR图片渲染工具
  7. 移动框架(大题)(仅供参考)
  8. 男神集训营 - 11款时尚发型,让你不再“灰头土脸”参加面试
  9. 来自 LOL 营运商劲舞娱乐对于北捷事件的声明稿
  10. ExecuteReader 要求已打开且可用的 Connection。连接的当前状态为打开。