看板 Fortran 關於我們 聯絡資訊
--------------------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
gazzy:INTEGER::ID 10/07 12:41
gazzy:INTEGER::BIRTHDAte 10/07 12:41
gazzy:沒試過,不確定 10/07 12:42
fishbaby314:應該是樓上講的,宣告ID跟BIRTHDAte時冒號:少一個 10/07 16:02
yesflower:對了 謝謝各位 10/08 16:43