24小时热门版块排行榜    

查看: 1969  |  回复: 10
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

superstat54

木虫 (小有名气)

[求助] Fortran 怎么把字符串转换为表达式

比如从文件中读入这样一串字符 "100 + x*x"复制给a,"sin(x)"赋值给b,如果程序中x=0.5,怎么在程序中把这一串字符"a + b"转换为表达式100 + x*x + sin(x) ,并求出其值?
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

superstat54

木虫 (小有名气)

引用回帖:
4楼: Originally posted by lurencyj at 2012-03-19 21:41:09:
The USE statement has the syntax

       USE environment-name,filename
where filename is optional, and is a character-valued expression. It causes the text of the named environment to be, in eff ...

麻烦编写一段简单Fortran代码示例一下……
5楼2012-03-19 21:50:35
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 11 个回答

lurencyj

木虫 (著名写手)

【答案】应助回帖


感谢参与,应助指数 +1
jjdg: 金币+1, 感谢参与 2012-03-21 01:43:17
可以用use语句试试。。。
很女子很弓虽大
2楼2012-03-19 21:34:52
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

superstat54

木虫 (小有名气)

引用回帖:
2楼: Originally posted by lurencyj at 2012-03-19 21:34:52:
可以用use语句试试。。。

能否写的详细些?谢谢!
3楼2012-03-19 21:38:46
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

lurencyj

木虫 (著名写手)

【答案】应助回帖


jjdg: 金币+1, 感谢参与 2012-03-21 01:43:23
The USE statement has the syntax

       USE environment-name,filename
where filename is optional, and is a character-valued expression. It causes the text of the named environment to be, in effect, placed in the program at the point where the USE statement was encountered, and the programs whose object code is in the environment to be callable from the program in which the USE statement is found, as well as (less usefully) from any other programs loaded into memory at the same time.

In some implementations, because ENVIRONMENTs are incompatible with the available linkage loading mechanisms, the filename may be compulsory the first time a USE statement referring to environments in a given file is encountered, but not in subroutines, even externally compiled subroutines, later in the source stream.
很女子很弓虽大
4楼2012-03-19 21:41:09
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[公派出国] 售SCI一区文章,我:8.O.551.O.5.4,科目全,可伽急 +3 wsYGJnURYvm6 2026-08-31 3/150 2026-09-01 01:52 by o3EMxHUAQDtS
[硕博家园] 售SCI一区文章,我:8O5.5.1.O5.4,科目全,可伽急 +3 wsYGJnURYvm6 2026-08-31 3/150 2026-09-01 01:40 by o3EMxHUAQDtS
[基金申请] 怎么看青基中了没有啊 +6 叶九微 2026-08-26 6/300 2026-08-31 23:54 by yudaoqian88
[基金申请] 国社科又开始会评了,不知道这次命运如何 +7 雨打竹帘 2026-08-30 11/550 2026-08-31 23:16 by hittle2008
[找工作] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +3 EZ67DG6CvcKL 2026-08-31 3/150 2026-08-31 22:23 by o3EMxHUAQDtS
[基金申请] 基金未中,这种答复是模板吗? +6 zhaosm1982 2026-08-27 7/350 2026-08-31 21:18 by qdxxmc
[基金申请] 哪位高人中了,把查询到的截图贴出来让我看看,让我长长见识 +6 yuleib84 2026-08-26 7/350 2026-08-31 19:46 by 鱼翔浅底1
[基金申请] 能否申诉? +7 echo8914667 2026-08-30 8/400 2026-08-31 17:00 by yihongxu
[文学芳草园] 梦想 +5 myrtle 2026-08-26 5/250 2026-08-31 14:40 by hahaboy
[基金申请] 中青基了要发朋友圈吗? +7 349506619 2026-08-28 7/350 2026-08-31 13:39 by 冼亮淀粉酶
[基金申请] 为什么到现在没收到通知? +5 tannykie 2026-08-29 5/250 2026-08-30 21:05 by purplejack
[基金申请] 有没有仍没收到信息的 +7 德尚中行 2026-08-27 8/400 2026-08-30 20:52 by purplejack
[基金申请] 国自然面上复盘~欢迎讨论 (金币+15) +15 晴天加油 2026-08-26 16/800 2026-08-29 18:28 by symmetry
[基金申请] 国自然评审意见 +13 wangmingqi 2026-08-28 19/950 2026-08-29 10:22 by Poppy1104
[基金申请] 2026年叶企孙基金 +4 bud_bud 2026-08-27 7/350 2026-08-29 07:23 by foolishmani
[基金申请] 为什么资助数各大高校都创新高,自己申请怎么就这么难 +12 Kittylucky 2026-08-27 13/650 2026-08-29 00:04 by superceng
[基金申请] 面上合作单位盖章 +5 ssyjh 2026-08-27 5/250 2026-08-27 20:50 by gdfollow
[基金申请] 为什么 国际(地区)合作与交流项目 没有放榜? 10+3 majunge000 2026-08-26 11/550 2026-08-27 08:42 by 北京莱茵编辑
[基金申请] 牛来!米来!面来! +8 beefly 2026-08-26 8/400 2026-08-26 08:37 by xuzhipiao
[基金申请] 某些机构,以效率低为荣,以效率低作为存在感 +9 yuleib84 2026-08-25 10/500 2026-08-25 17:14 by alexon
信息提示
请填处理意见