| 查看: 1707 | 回復(fù): 10 | ||
superstat54木蟲 (小有名氣)
|
[求助]
Fortran 怎么把字符串轉(zhuǎn)換為表達(dá)式
|
| 比如從文件中讀入這樣一串字符 "100 + x*x"復(fù)制給a,"sin(x)"賦值給b,如果程序中x=0.5,怎么在程序中把這一串字符"a + b"轉(zhuǎn)換為表達(dá)式100 + x*x + sin(x) ,并求出其值? |
木蟲 (著名寫手)

木蟲 (小有名氣)
木蟲 (著名寫手)
|
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. |

木蟲 (小有名氣)
木蟲 (著名寫手)

新蟲 (小有名氣)
木蟲 (小有名氣)
木蟲 (正式寫手)
star watcher
| 一個(gè)辦法,用yacc和bison產(chǎn)生C語(yǔ)言的parser,然后用fortran調(diào)用。不過(guò)我覺(jué)得沒(méi)必要搞這么麻煩,如果不是計(jì)算量很大,用python,matlab的eval就簡(jiǎn)單多了。 |
新蟲 (小有名氣)
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 300求調(diào)劑,材料科學(xué)英一數(shù)二 +10 | leaflight 2026-03-24 | 10/500 |
|
|---|---|---|---|---|
|
[考研] 337求調(diào)劑 +4 | 《樹(shù)》 2026-03-29 | 4/200 |
|
|
[考研] 317分 一志愿南理工材料工程 本科湖工大 求調(diào)劑 +10 | 芋泥小鈴鐺 2026-03-28 | 10/500 |
|
|
[考研] 材料科學(xué)與工程求調(diào)劑 +6 | 深V宿舍吧 2026-03-29 | 6/300 |
|
|
[考研] 311求調(diào)劑 +6 | 冬十三 2026-03-24 | 6/300 |
|
|
[考研] 一志愿:西北大學(xué),英一數(shù)一408-284分求調(diào)劑 +4 | 12.27 2026-03-27 | 4/200 |
|
|
[考研] 0856材料化工調(diào)劑 總分330 +14 | zhubinhao 2026-03-27 | 14/700 |
|
|
[考研] 本科雙非材料,跨考一志愿華電085801電氣,283求調(diào)劑,任何專業(yè)都可以 +6 | 芝士雪baoo 2026-03-28 | 8/400 |
|
|
[考研] 322求調(diào)劑 +5 | 舊吢 2026-03-24 | 5/250 |
|
|
[考研] 材料277求調(diào)劑 +7 | min3 2026-03-24 | 7/350 |
|
|
[考研] 265求調(diào)劑 +8 | 小木蟲085600 2026-03-27 | 8/400 |
|
|
[考研] 266分求材料化工冶金礦業(yè)等專業(yè)的調(diào)劑 +4 | 哇呼哼呼哼 2026-03-26 | 4/200 |
|
|
[考研] 07化學(xué)280分求調(diào)劑 +10 | 722865 2026-03-23 | 10/500 |
|
|
[考研] 考研化學(xué)308分求調(diào)劑 +10 | 你好明天你好 2026-03-23 | 12/600 |
|
|
[考研] 333求調(diào)劑 +6 | wfh030413@ 2026-03-23 | 6/300 |
|
|
[考研] 化學(xué)調(diào)劑一志愿上海交通大學(xué)336分-本科上海211 +4 | 小魚愛(ài)有機(jī) 2026-03-25 | 4/200 |
|
|
[考研] 07化學(xué)303求調(diào)劑 +5 | 睿08 2026-03-25 | 5/250 |
|
|
[考研] 機(jī)械學(xué)碩總分317求調(diào)劑!。! +4 | Acaciad 2026-03-25 | 4/200 |
|
|
[考研] 材料與化工304求B區(qū)調(diào)劑 +3 | 邱gl 2026-03-25 | 3/150 |
|
|
[考研] 347求調(diào)劑 +4 | L when 2026-03-25 | 4/200 |
|