| ²é¿´: 1596 | »Ø¸´: 10 | |||
| µ±Ç°Ö»ÏÔʾÂú×ãÖ¸¶¨Ìõ¼þµÄ»ØÌû£¬µã»÷ÕâÀï²é¿´±¾»°ÌâµÄËùÓлØÌû | |||
kathy2008ľ³æ (ÕýʽдÊÖ)
|
[½»Á÷]
¡¾ÇóÖú¡¿Çë¸ÄÕý´íÎó ÒÑÓÐ7È˲ÎÓë
|
||
|
±¾ÈËÔÚÔËÐÐÒ»³ÌÐò£¬ÄÚÓÐÒ»¶Î³ÌÐòÈçÏ£º program ex1009 use func implicit none type(person), target :: p(5) = (/ person("³Âͬѧ", 180.0, 75.0), person("»ÆÍ¬Ñ§", 170.0, 65.0), person("Áõͬѧ", 175.0, 80.0), person("²Ìͬѧ", 182.0, 78.0), person("Ðíͬѧ", 178.0, 70.0) /) type(pperson) :: pt(5) ÔËÐк󣬱¨´íÈçÏ£º C:\Program Files\Microsoft Visual Studio\MyProjects\chapter 10\9.for(40) : Error: Syntax error, found END-OF-STATEMENT when expecting one of: ( type(person), target :: p(5) = (/ person('³Âͬѧ', 180.0, 75.0), ---------------------------------------------------------------------------^ C:\Program Files\Microsoft Visual Studio\MyProjects\chapter 10\9.for(41) : Error: Syntax error, found END-OF-STATEMENT when expecting one of: ( person('»ÆÍ¬Ñ§', 170.0, 65.0), -------------------------------------------------------------------^ C:\Program Files\Microsoft Visual Studio\MyProjects\chapter 10\9.for(42) : Error: Syntax error, found END-OF-STATEMENT when expecting one of: ( person("Áõͬѧ", 175.0, 80.0), -----------------------------------------------------------------------------------------------^ C:\Program Files\Microsoft Visual Studio\MyProjects\chapter 10\9.for(43) : Error: Syntax error, found END-OF-STATEMENT when expecting one of: ( person("²Ìͬѧ", 182.0, 78.0), ÇëÎʸßÊÖÈçºÎ¸ÄÕý¡£Ð»Ð»¡£ |
» ²ÂÄãϲ»¶
0805Çóµ÷¼Á
ÒѾÓÐ5È˻ظ´
342Çóµ÷¼Á
ÒѾÓÐ7È˻ظ´
µ÷¼Á
ÒѾÓÐ6È˻ظ´
Ò»Ö¾Ô¸±±¾©¿Æ¼¼´óѧ085601²ÄÁϹ¤³ÌÓ¢Ò»Êý¶þ³õÊÔ×Ü·Ö335Çóµ÷¼Á
ÒѾÓÐ3È˻ظ´
273Çóµ÷¼Á
ÒѾÓÐ4È˻ظ´
339Çóµ÷¼Á
ÒѾÓÐ3È˻ظ´
267Çóµ÷¼Á
ÒѾÓÐ7È˻ظ´
070300»¯Ñ§279Çóµ÷¼Á
ÒѾÓÐ11È˻ظ´
318Çóµ÷¼Á
ÒѾÓÐ3È˻ظ´
309·Ö085801Çóµ÷¼Á
ÒѾÓÐ4È˻ظ´
» ±¾Ö÷ÌâÏà¹Ø¼ÛÖµÌùÍÆ¼ö£¬¶ÔÄúͬÑùÓаïÖú:
Çë½Ì fortran ÔËÐдíÎóµÄÔÒò
ÒѾÓÐ13È˻ظ´
¸ßÊÖÇë½ø °ïæ¾ÀÕýÖÐÒëÓ¢´íÎó ¸Ðл
ÒѾÓÐ2È˻ظ´
СµÜÏëͶµ¥¾§Ñ§±¨E£¬µ«ÓÐÈý¸öGÀà´íÎó£¬Çë¸÷λ´óϺÃDz»Áߴͽ̡£¡£¡£
ÒѾÓÐ3È˻ظ´
Á¿»¯Öгö´íµÄlogÎļþ
ÒѾÓÐ5È˻ظ´
Ͷ¸åºó³É¹¦ºó£¬ÓÖ·¢ÏÖÁ˼¸¸öС´íÎó
ÒѾÓÐ31È˻ظ´
¡¾ÇóÖú¡¿¼¸ºÎÓÅ»¯ÎÊÌâ
ÒѾÓÐ25È˻ظ´
¡¾ÇóÖú¡¿¼¸¸öAÀà´íÎóÈçºÎÐÞÕý£¿
ÒѾÓÐ8È˻ظ´
ÒÑ·¢±íµÄÂÛÎÄ·¢ÏÖÓд¦´íÎó£¬Ôõô°ì£¬¼±£¡£¡£¡
ÒѾÓÐ36È˻ظ´
ÒÔǰµÄһƪ·¢±íÂÛÎÄÊý¾ÝÓдíÎó¸ÃÔõô°ì£¿
ÒѾÓÐ8È˻ظ´
¡¾ÇóÖú¡¿Á½¸öAÀà´íÎó
ÒѾÓÐ15È˻ظ´
¡¾ÇóÖú¡¿Ph¼ÆÐ£Õý´íÎóÔõô°ì
ÒѾÓÐ24È˻ظ´
±ÇÌéÅ£
½ð³æ (³õÈëÎÄ̳)
- Ó¦Öú: 0 (Ó×¶ùÔ°)
- ½ð±Ò: 526.6
- ºì»¨: 1
- Ìû×Ó: 45
- ÔÚÏß: 69.6Сʱ
- ³æºÅ: 961093
- ×¢²á: 2010-03-04
- ÐÔ±ð: GG
- רҵ: º£Ñ󹤳Ì
²»ºÃÒâ˼£¬·¢´íÁË
¡ï
Сľ³æ(½ð±Ò+0.5):¸ø¸öºì°ü£¬Ð»Ð»»ØÌû½»Á÷
Сľ³æ(½ð±Ò+0.5):¸ø¸öºì°ü£¬Ð»Ð»»ØÌû½»Á÷
|
type(person), target :: p(5) = (/ person("³Âͬѧ", 180.0, 75.0), & person("»ÆÍ¬Ñ§", 170.0, 65.0), & person("Áõͬѧ", 175.0, 80.0), & person("²Ìͬѧ", 182.0, 78.0), & person("Ðíͬѧ", 178.0, 70.0) /) ±¾ÎÄÀ´×Ô: Сľ³æÂÛ̳ http://muchong.com/bbs/viewthread.php?tid=2348595&pid=2148561&page=1#pid2148561 |

9Â¥2010-09-03 08:24:18
yfx2003
½ð³æ (ÖøÃûдÊÖ)
- Ó¦Öú: 7 (Ó×¶ùÔ°)
- ½ð±Ò: 1434.3
- ºì»¨: 4
- Ìû×Ó: 1777
- ÔÚÏß: 62.9Сʱ
- ³æºÅ: 1037371
- ×¢²á: 2010-06-07
- רҵ: ¼ÆËã»ú¿ÆÑ§µÄ»ù´¡ÀíÂÛ

3Â¥2010-08-31 08:45:26
kathy2008
ľ³æ (ÕýʽдÊÖ)
- Ó¦Öú: 0 (Ó×¶ùÔ°)
- ½ð±Ò: 2161.5
- ºì»¨: 2
- Ìû×Ó: 328
- ÔÚÏß: 213.2Сʱ
- ³æºÅ: 558502
- ×¢²á: 2008-05-15
- ÐÔ±ð: GG
- רҵ: ²ÄÁÏÎïÀí»¯Ñ§
|
Èç¹û×Ô¼º»á¸ÄÕý´íÎ󣬾Ͳ»»á·¢µ½ÕâÂÛ̳ÉÏÀ´ÁË¡£ÎÒÊÇÖ¸ÔËÐÐÅí¹úÂÖFortran95 µÄÔ´³ÌÐòʱ±¨´íµÄ¡£ÎļþÃûΪex0921.for.ÒòΪÓöµ½ºÃ¼¸¸öÀàËÆµÄÎÊÌ⣬ËùÒÔÇë¸ßÊÖÖ¸µã¡£³ÌÐòÈçÏ£º module typedef type student integer :: Chinese,English,Math,Natural,Social integer :: total end type end module program ex0921 use typedef implicit none integer,parameter :: fileid=10 integer,parameter :: students=20 character(len=80) :: tempstr type(student) :: s(students) type(student) :: total integer i,num,error open(fileid,file="grades.txt",status="old",iostat=error) if(error/=0) then write(*,*) "open grades.txt fail." end if read(fileid,"(A80)" tempstr total=student(0,0,0,0,0) do i=1,students read(fileid,*) num,s(i)%Chinese,s(i)%English,s(i)%Math, s(i)%Natural,s(i)%Social s(i)%total=s(i)%Chinese + s(i)%English + s(i)%Math + s(i)%Natural + s(i)%Social total%Chinese = total%Chinese + s(i)%Chinese total%English = total%English + s(i)%English total%Math = total%Math + s(i)%Math total%Natural = total%Natural + s(i)%Natural total%Social = total%Social + s(i)%Social total%Total = total%Total + s(i)%Total end do write(*,"(7A7)" "×ùºÅ","ÖÐÎÄ","Ó¢ÎÄ","Êýѧ","×ÔÈ»","Éç»á","×Ü·Ö"do i=1,students write(*,"(7I7)" i, s(i)end do write(*,"(A7,6F7.1)" "ƽ¾ù"real(total%Chinese) real(students), real(total%English) real(students), real(total%Math) real(students), real(total%Natural) real(students), real(total%Social) real(students), real(total%Total) real(students) stop end program |
4Â¥2010-08-31 09:53:37
yalefield
½ð³æ (ÎÄ̳¾«Ó¢)
ÀϺºÒ»Ã¶
- ³ÌÐòÇ¿Ìû: 3
- Ó¦Öú: 129 (¸ßÖÐÉú)
- ¹ó±ö: 0.17
- ½ð±Ò: 21238.9
- É¢½ð: 3440
- ºì»¨: 66
- Ìû×Ó: 12101
- ÔÚÏß: 759.1Сʱ
- ³æºÅ: 96063
- ×¢²á: 2005-10-07
- רҵ: ¸ßµÈ½ÌÓýѧ
- ¹ÜϽ: ¼ÆËãÄ£Äâ
¡ï ¡ï
Сľ³æ(½ð±Ò+0.5):¸ø¸öºì°ü£¬Ð»Ð»»ØÌû½»Á÷
ÓàÔó³É(½ð±Ò+1):ÐÁ¿àÁË£¡ 2010-08-31 15:45:12
Сľ³æ(½ð±Ò+0.5):¸ø¸öºì°ü£¬Ð»Ð»»ØÌû½»Á÷
ÓàÔó³É(½ð±Ò+1):ÐÁ¿àÁË£¡ 2010-08-31 15:45:12
|
Óë³ÌÐò¹ØÏµ²»´ó£¬ÓëÄúµÄÓ¢Óïˮƽ¹ØÏµºÜ´ó¡£ Syntax error ¡°¾ä·¨´íÎ󣺡± Fortran£¬ÄÜÕâô»»ÐÐÂ𣿠°³±Õ¹Ø¶àÄê£¬Õæ²»ÖªµÀÊÀʱäǨ¡£ |
5Â¥2010-08-31 10:06:47














»Ø¸´´ËÂ¥
"×ùºÅ","ÖÐÎÄ","Ó¢ÎÄ","Êýѧ","×ÔÈ»","Éç»á","×Ü·Ö"