| 查看: 1706 | 回復(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ā)表 | |
|---|---|---|---|---|
|
[考研] 085601材料工程找調(diào)劑 +14 | oatmealR 2026-03-29 | 15/750 |
|
|---|---|---|---|---|
|
[考研] 311求調(diào)劑 +6 | 冬十三 2026-03-24 | 6/300 |
|
|
[考研] 296求調(diào)劑 +6 | 彼岸t 2026-03-29 | 6/300 |
|
|
[考研] 329求調(diào)劑 +10 | 鈕恩雪 2026-03-25 | 10/500 |
|
|
[考研] 一志愿北京理工大學(xué)本科211材料工程294求調(diào)劑 +8 | mikasa的圍巾 2026-03-28 | 8/400 |
|
|
[考研] 求調(diào)劑,一志愿 南京航空航天大學(xué) ,080500材料科學(xué)與工程學(xué)碩,總分289分 +7 | @taotao 2026-03-29 | 7/350 |
|
|
[考研] 材料學(xué)碩333求調(diào)劑 +11 | 北道巷 2026-03-24 | 11/550 |
|
|
[考研] 學(xué)碩274求調(diào)劑 +9 | Li李魚 2026-03-26 | 9/450 |
|
|
[考研] 調(diào)劑 +3 | 好好讀書。 2026-03-28 | 3/150 |
|
|
[考研] 292求調(diào)劑 +14 | 鵝鵝鵝額額額額?/a> 2026-03-25 | 15/750 |
|
|
[考研] 張芳銘-中國(guó)農(nóng)業(yè)大學(xué)-環(huán)境工程專碩-298 +4 | 手機(jī)用戶 2026-03-26 | 4/200 |
|
|
[考研] 272求調(diào)劑 +7 | 腳滑的守法公民 2026-03-27 | 7/350 |
|
|
[考研] 材料292調(diào)劑 +12 | 橘頌思美人 2026-03-23 | 12/600 |
|
|
[考研] 085600材料與化工調(diào)劑 +10 | A-哆啦Z夢(mèng) 2026-03-23 | 16/800 |
|
|
[考研] 085600,材料與化工321分調(diào)劑 +4 | 大饞小子 2026-03-27 | 6/300 |
|
|
[考研] 325求調(diào)劑 +3 | Aoyijiang 2026-03-23 | 3/150 |
|
|
[考研] 材料科學(xué)與工程 317求調(diào)劑 +4 | JKSOIID 2026-03-26 | 4/200 |
|
|
[考研] 300分,材料,求調(diào)劑,英一數(shù)二 +5 | 超贊的 2026-03-24 | 5/250 |
|
|
[考研] 一志愿南航材料專317分求調(diào)劑 +5 | 炸呀炸呀炸薯?xiàng)l 2026-03-23 | 5/250 |
|
|
[論文投稿] 急發(fā)核心期刊論文 +3 | 賢達(dá)問(wèn)津 2026-03-23 | 5/250 |
|