Re: 超新手問題

看板Fortran作者 (我是男人 ￾N )時間15年前 (2009/10/07 12:26), 編輯推噓1(104)
留言5則, 3人參與, 最新討論串3/3 (看更多)
--------------------Configuration: PERSON - Win32 Debug-------------------- Compiling Fortran... C:\Program Files\Microsoft Visual Studio\MyProjects\PERSON\PERSON.F90 C:\Program Files\Microsoft Visual Studio\MyProjects\PERSON\PERSON.F90(5) : Error: Syntax error, found IDENTIFIER 'ID' when expecting one of: DO FORALL SELECT SELECTCASE WHERE IF INTEGER:ID --------^ C:\Program Files\Microsoft Visual Studio\MyProjects\PERSON\PERSON.F90(6) : Error: Syntax error, found IDENTIFIER 'BIRTHDATE' when expecting one of: DO FORALL SELECT SELECTCASE WHERE IF INTEGER:BIRTHDATE --------^ C:\Program Files\Microsoft Visual Studio\MyProjects\PERSON\PERSON.F90(5) : Error: This statement is not permitted as a statement within a derived-type-def INTEGER:ID ^ C:\Program Files\Microsoft Visual Studio\MyProjects\PERSON\PERSON.F90(6) : Error: This statement is not permitted as a statement within a derived-type-def INTEGER:BIRTHDATE ^ C:\Program Files\Microsoft Visual Studio\MyProjects\PERSON\PERSON.F90(16) : Error: This is not a field name that is defined in the encompassing structure. [ID] read(*,*) v%ID ----------------------^ C:\Program Files\Microsoft Visual Studio\MyProjects\PERSON\PERSON.F90(18) : Error: This is not a field name that is defined in the encompassing structure. [BIRTHDATE] read(*,*) v%BIRTHDATE ----------------------^ Error executing df.exe. PERSON.OBJ - 6 error(s), 0 warning(s) 是因為我沒輸入六個變數嗎? 還是不太懂 qq -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.115.72.26

10/07 12:41, , 1F
INTEGER::ID
10/07 12:41, 1F

10/07 12:41, , 2F
INTEGER::BIRTHDAte
10/07 12:41, 2F

10/07 12:42, , 3F
沒試過,不確定
10/07 12:42, 3F

10/07 16:02, , 4F
應該是樓上講的,宣告ID跟BIRTHDAte時冒號:少一個
10/07 16:02, 4F

10/08 16:43, , 5F
對了 謝謝各位
10/08 16:43, 5F
文章代碼(AID): #1Ap1X_pa (Fortran)
討論串 (同標題文章)
文章代碼(AID): #1Ap1X_pa (Fortran)