ERROR:constants and expressions are invalid in read-only I/O

aolisea2022-10-04 11:39:541条回答

ERROR:constants and expressions are invalid in read-only I/O list.[NO].
我有一些坐标点 txt格式的 分4列 第一列编号 第二三四列分别是X Y Z坐标 怎么把它读入fortran中假设文件名为“1.txt”
open(1,file='1.txt')
do i=1,n
read(1,*)n0(i),x(i),y(i),z(i)
enddoERROR:constants and expressions are invalid in read-only I/O list.[No]read(12,*),n0(i),x(i),y(i),z(i)求指导,

已提交,审核后显示!提交回复

共1条回复
jihengjun 共回答了19个问题 | 采纳率78.9%
data.txt
1 0.0 0.0 0.0
2 0.1 0.1 0.1
3 0.2 0.2 0.2
program main
implicit real*8(a-h,o-z)
dimension x(3),y(3),z(3)
open(1,file='data.txt')
do i=1,3
read(1,*) itemp,x(i),y(i),z(i)
enddo
write(*,*) 'x=',x
write(*,*) 'y=',y
write(*,*) 'z=',z
end program
这样可以,你试试!
1年前

相关推荐

翻译:differential ring extensions with no new constants
tcico之侠1年前1
差错Mylove 共回答了19个问题 | 采纳率89.5%
无新常数的微分环延伸
ABAP/4 常量定义问题constants c(3) type p decimals 4 value '3.12345
abap/4 常量定义问题
constants c(3) type p decimals 4 value '3.12345'.这样写ok,但是
constants c(3) type p decimals 5 value '3.12345'.这样写就***,为什么?
coral_han1年前1
罗裙175 共回答了12个问题 | 采纳率83.3%
下面是我点F1后的帮助中P类型的取值范围的公式:
(-10^(2len -1) +1) / (10^(+dec)) to (+10^(2len -1) -1) /(10^(+dec))
变型一下,整数部分+小数部分
-10^(2len-1-dec) + 10^(-dec) 到 10^(2len-1-dec) - 10^(-dec)
在整数部分的指数中,
len = 3,dec = 4时,2*3-1-4 = 1,存在整数部分;
len = 3,dec = 5时,2*3-1-5 = 0,整数部分指数为0,这样就无意义了.
英语翻译The constants parameters obtained from single (RB21 and
英语翻译
The constants parameters obtained from single (RB21 and RR195) adsorption equilibrium data were used to predict the binary adsorption behaviour of reactive blue21 and reactive red195 [11].
lgp20051年前1
真系爱你 共回答了19个问题 | 采纳率89.5%
从单一(活性蓝21 和活性红195)吸附平衡数据中获得的常量参数常常预示着活性蓝21和活性红195会发生混合吸附的状况.
英语翻译List of ConstantsConstantno.DedicatedindicatorDescriptio
英语翻译
List of Constants
Constant
no.
Dedicated
indicator
Description Setting range Factory setting
n01 Constant write-inhibit selection/
constant initialization
0,1,8,9 1
n02 Operation mode selection 0 to 5 0
n03 Interruption mode selection 0,1 0
n04 Forward/reverse rotation
selection
For,rEv For
n06 Multi-function input selection
0 to 4 1
n09 Multi-function output selection
0,1,2 1
n11 Frequency reference 1 0.0 to 400 6.0 (Hz)
n12 Frequency reference 2 0.0 to 400 0.0 (Hz)
n20 Acceleration time 0.0 to 999 10.0 (seconds)
n21 Deceleration time 0.0 to 999 10.0 (seconds)
n24 Maximum frequency 50.0 to 400 60.0 (Hz)
n25 Maximum voltage 1 to 255
(see note 1)
200 (V)
(see note 1)
n26 Maximum voltage frequency 1.6 to 400 60.0 (Hz)
n31 Electronic thermal reference
current
0.0 to see note 2 See note 2
n33 Stall prevention during deceleration
0,1 0
n36 Operation after recovery
from power interruption
0,1,2 0
n37 Carrier frequency 1,2,3,4
(see note 3)
4
(see note 4)
n39 Frequency reference gain 0.10 to 2.55 1.00
n40 Frequency reference bias –99 to 99 0 (%)
n61 Stop Key selection 0,1 0
n64 Operator’s frequency setting
method
0,1 0
n68 Error history (Display only)
apcii1年前1
luiss619 共回答了16个问题 | 采纳率81.3%
List of Constants 常量表Constant 常量no.号码Dedicated 专indicator 指标Description Setting range Factory setting 设置成出厂n01 Constant write-inhibit selection/constant initialization 常量设置禁止/常量...
问一些化学问题(英文的)1)The stepwise formation constants for the compl
问一些化学问题(英文的)
1)
The stepwise formation constants for the complex [Ni(NH 3) 6]Cl 2 are
log 10K 1 = 2.72,
log 10K 2 = 2.17,
log 10K 3 = 1.66,
log 10K 4 = 1.12,
log 10K 5 = 0.67 and
log 10K 6 = -0.03.
The log 10β 6 is therefore:-

A. 8.31
B. 8
C. 8.34
D. 4.04
2)
There are five dimethylhexane isomers. Which one(s) can exhibit optical activity? (Select ALL correct answers)
A. 3,3-dimethylhexane
B. 2,3-dimethylhexane
C. 2,4-dimethylhexane
D. 2,5-dimethylhexane
E. 2,2-dimethylhexane
3)
Select the active nitrating species in aromatic nitration reactions involving a mixture of concentrated nitric and concentrated sulfuric acids:
A. HO-NO2
B. NO2-
C. NO2+
D. HO-SO2-ONO2
E. [H2O-NO2]+
4)
What class of organic compound is hydrolysed in aqueous acid to produce a carboxylic acid and an alcohol?
rjg5651041年前1
ygh104 共回答了21个问题 | 采纳率90.5%
1)?
2)abce
3)d
4)Este