24小时热门版块排行榜    

查看: 1204  |  回复: 10
【悬赏金币】回答本帖问题,作者superstat54将赠送您 12 个金币
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

superstat54

木虫 (小有名气)

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

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

» 猜你喜欢

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

已阅   回复此楼   关注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的回帖
查看全部 11 个回答

lurencyj

木虫 (著名写手)

【答案】应助回帖


感谢参与,应助指数 +1
jjdg: 金币+1, 感谢参与 2012-03-21 01:43:17
可以用use语句试试。。。
很女子很弓虽大
2楼2012-03-19 21:34:52
已阅   回复此楼   关注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的回帖

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的回帖
不应助 确定回帖应助 (注意:应助才可能被奖励,但不允许灌水,必须填写15个字符以上)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 博后基金意难平…… +16 kkll2025 2024-06-29 20/1000 2024-06-29 23:48 by songyuren
[访问学者] no news is good news +6 wyjecho666 2024-06-29 9/450 2024-06-29 23:15 by joeymt
[硕博家园] 开题 +3 东北。 2024-06-29 5/250 2024-06-29 21:58 by zyqchem
[访问学者] 国家公派访问学者出结果了 +10 326lhpqk 2024-06-29 18/900 2024-06-29 21:55 by shi01587
[基金申请] 我劝基金委要善良+一个大胆的设想 +13 我是大王 2024-06-28 15/750 2024-06-29 17:46 by lucky_my2010
[论文投稿] 求助光催化方向二区末,三区期刊 5+3 糖糖不落布 2024-06-27 8/400 2024-06-29 15:24 by 糖糖不落布
[基金申请] 感觉地区基金太难了,申请了多年不中 +24 123为wqw 2024-06-27 31/1550 2024-06-29 14:14 by Siuhong Yiu
[论文投稿] 我在写关于多维空间的论文,希望能与大家交流,准备在science上发表 +10 lgf519 2024-06-24 14/700 2024-06-29 01:16 by f1yfish
[药学] 大佬们来讨论下,为什么分子里加入了有毒性的官能团分子反而没毒了 +4 HF111001 2024-06-24 5/250 2024-06-28 22:45 by 渣男2019
[考博] 2025年博士申请——电催化方向 +3 蜗牛123.... 2024-06-27 3/150 2024-06-28 12:29 by highxixi
[考博] 论文被硕导卡 +6 自强不息a?a 2024-06-26 9/450 2024-06-27 21:37 by chemhua
[论文投稿] 为何全世界都用JCR分区,咱们要弄个中科院分区?意义何在? +6 意得辑_editage 2024-06-25 7/350 2024-06-27 20:59 by keyaner23
[基金申请] 75批面上出结果了么?系统卡的进不去了 +4 wziguang33 2024-06-27 4/200 2024-06-27 15:53 by xter9665
[基金申请] 博后面上今天下午会公布吗?有无消息? +26 hajkdfdf 2024-06-24 45/2250 2024-06-27 09:19 by kyukitu
[有机交流] 做什么表征可以检测塑料中碳氢氧的含量 5+3 pzr的sci之路 2024-06-25 7/350 2024-06-26 19:32 by wrgeng
[基金申请] 省基金对国自然申请是有利还是有弊 +6 zycumt04 2024-06-26 7/350 2024-06-26 15:02 by 潇湘之迷
[硕博家园] 申博雅思求助 +6 刘嘉研究究 2024-06-24 7/350 2024-06-26 07:08 by 小李醒yy
[基金申请] 这样的说辞是上会了吗 +12 学员d3zYCz 2024-06-24 15/750 2024-06-25 22:05 by 3115321
[金属] 寻找钛合金热压缩代做 +4 liuyang358 2024-06-23 4/200 2024-06-24 13:50 by 搬砖狗不放弃
[有机交流] 生成亚胺的反应怎么能进行完全 +3 1369836 2024-06-23 3/150 2024-06-23 18:44 by hwqMSE
信息提示
请填处理意见