Saturday, August 18, 2007

write example for fortran 90

WRITE(*,*) itest ! 1234567
WRITE(*,'(I6)') itest ! ******
WRITE(*,'(I10)') itest ! 1234567
WRITE(*,'(I10.9)') itest ! 001234567
WRITE(*,'(2I7)') itest, 7654321 ! 12345677654321
WRITE(*,'(2I8)') itest, 7654321 ! 1234567 7654321

WRITE(*,*) itest ! 1.2345670E+02 -not F format
WRITE(*,'(F8.0)') itest ! 123
WRITE(*,'(F10.4)') itest ! 123.4567
WRITE(*,'(F10.5)') itest ! 123.45670
WRITE(*,'(F10.9)') itest ! **********
WRITE(*,'(2F8.4)') itest, 7654321 ! 123.4567765.4321
WRITE(*,'(2F10.4)') itest, 7654321 ! 123.4567 765.4321

WRITE(*,*) itest ! 1.2345670E+02
WRITE(*,'(E10.4)') itest ! 0.1234E+09
WRITE(*,'(E10.5)') itest ! .12345E+09
WRITE(*,'(E10.4E3)') itest ! .1234E+009
WRITE(*,'(E10.9)') itest ! **********
WRITE(*,'(2E12.4)') itest, 7654321 ! 0.12345E+090.76543E+04
WRITE(*,'(2E10.4)') itest, 7654321 ! 0.1234E+090.7654E+04

WRITE(*,*) itest ! 1.2345000E+04
WRITE(*,'(EN13.6)') ! 12.345000E+03
WRITE(*,'(ES13.6)') ! 1.234500E+04 ES - Scientific - the value before the decimal point always lies in the range 1..10

CHARACTER(LEN=8) :: long='Bookshop'
CHARACTER(LEN=1) :: short='B'
WRITE(*,*) long ! Bookshop
WRITE(*,'(A)') long ! Bookshop
WRITE(*,'(A8)') long ! Bookshop
WRITE(*,'(A5)') long ! Books
WRITE(*,'(A10)') long ! Bookshop
WRITE(*,'(A)') short ! B
WRITE(*,'(2A) short, long ! BBookshop
WRITE(*,'(2A3) short, long ! BBoo

LOGICAL :: ltest=.FALSE.
WRITE(*,*) ltest ! F
WRITE(*,'(2L1)') ltest, .NOT.ltest ! FT
WRITE(*,'(L7)') ltest ! F

WRITE(*,'(I4, 2X, I4)') i, i-1 ! 1234 1233 Blank Spaces (Skip Character Positions)
WRITE(*,'(I4, 4X, I4)') i, i-1 ! 1234 1233

Special Characters

' ' to output the character string specified
/ specifies take a new line
( ) to group descriptors, normally for repetition
INTEGER :: value = 100
INTEGER :: a=101, b=201
WRITE(*,'( 'The value is', 2X, I3, ' units.')') value
WRITE(*,'( 'a =', 1X, I3, /, 'b = ', 1X, I3)')
WRITE(*,'( 'a and b =', 2(1X, I3) )') a, b

44 comments:

ElroyTLanphear said...

080免費聊天網0509電話視訊聊天電話視訊聊天免費聊天免費視訊聊天免費視訊聊天免費視訊影音視訊0401影音視訊聊天室0401網愛聊天室0401網愛聊天室0401視訊美女0401視訊美女0401免費視訊0401免費視訊情色0401成人交友0401成人0401成人聊天室

九份 said...

Always keep your words soft and sweet, just in case you have to eat them.............................................

vivi19780125 said...

這麼優的部落格一定要持續下去!........................................

佩怡 said...

good~ keep sharing with us, please....I will waiting your up date everyday!! Have a nice day........................................

冠伶 said...

喜歡你的部落格,讓人流連忘返 ........................................

于名于名 said...

thx u very much, i learn a lot

仁南 said...

thank you for you to make me learn more,thank you∩0∩

AmiraE_Tao0614 said...

激情成人聊天室情色成人辣妹胸部辣妹視訊露奶辣妹自拍三點全露內衣秀台灣成人貼圖成人電影院三點全裸免費視訊辣妹av圖裸體自拍色情聊天美女視訊g點色情訊息淫女火辣av辣妹圖片免費視訊聊天室情色天空調情上床圖片裸體自拍走光照片走光視訊情色成人18成人區火辣美女成人vcd成人影片下載本土av性愛情慾淫妹美女聊天性愛聊天室女生自慰影片免費看a圖淫婦巨乳辣妹視訊成人女生自慰方法免費情色限制級a片穿幫情色下載情色網站

FranciscoL_俊毅Swaney0806 said...

活是一種鍛鍊靈魂的東西......................................................

逸凡逸凡 said...

thank u........................................

嘉容嘉容 said...

18禁,聊天,免費影片,美女短片,0401,免費聊天,免費視訊,0204,78論壇,亞洲影城,視訊聊天,免費影片,聊天室,ut,成人,視訊,都都,視訊,打飛機專用網,小高聊天室,視訊,免費影片,a片免費,a片,18,免費線上視訊,日本a電影,影音視訊聊天室,貼圖區,av,383,77p2p,85cc,無碼,av影片,av專賣店,a片線上看,a圖,免費線上影片,微風成人

BenWann1259 said...

生命中最美麗的報償之一便是幫助他人的同時,也幫助了自己。 ..................................................

伯函 said...

A friend to everybody is a friend to nobody..............................................

韋于倫成 said...

當一個人內心能容納兩樣相互衝突的東西,這個人便開始變得有價值了。..................................................

智宜智宜 said...

Lets cross the bridge when we come to it........................................

瓊慧 said...

視訊美女聊天室戀愛ing聊天室視訊網愛免費影片分享視訊聊天交友elove無碼av女優,av成人網,台灣kiss情色貼圖彩虹情人視訊彩虹情人視訊交友網後宮視訊ol制服美女影片視訊交友cleansing78論壇av短片-免費a片yam交友浪漫月光論免費影片-aa看倉井空成人情色文學成人情色文學A漫 H漫 成人貼圖片區A漫 H漫 成人貼圖片區成人影片成人片色情片色情影片成人區做愛a片a漫網愛 聊天室網愛 聊天室視訊 美女視訊 美女成人 視訊視訊做愛視訊做愛性愛 聊天室性愛 聊天室情色 聊天室

IrwinE_若愛Buchholz0723若愛 said...

思想與理論,貴呼先於行動,但行動較思想或理論更高貴..............................

王周宏儒 said...

幸福不是一切,人還有責任。..................................................

俊翔 said...

人有兩眼一舌,是為了觀察倍於說話的緣故。................................................................

巧生 said...

看看blog放鬆一下,工作累死了................................................................

蔣筱芸 said...

一個人的價值,應該看他貢獻了什麼,而不是他取得了什麼.................................................................                           

銘木 said...

一個人的價值,應該看他貢獻了什麼,而不是他取得了什麼....................................................................

峻龍 said...

成熟,就是有能力適應生活中的模糊。.................................................................

函松函松 said...

人生是故事的創造與遺忘。............................................................

JasonBirk佳琪 said...

朋友是一面鏡子............................................................

蕙春蕙春 said...

Say not all that you know, believe not all that you hear.............................................................

吳婷婷 said...

一時的錯誤不算什麼,錯而不改才是一生中永遠且最大的錯誤............................................................

SarahD_Mon淑盛 said...

很期待新的內容,幫你推個文^^ ............................................................

宥妃宥妃 said...

來給你加油打氣,祝福大家開開心心。 ............................................................

方偉白方偉白 said...

真正仁慈的人,會忘記他們做過的善行,他們全心投入現在的工作,過去的事已被遺忘。..................................................

林彥以林彥以 said...

Great minds think alike...................................................

魏江伶魏江伶 said...

時間可證明一切~你的BLOG是我覺得不賴的............................................................

d1gd21g231g21s said...

來幫忙拼人氣~Go Go Go 時間可證明一切............................................................

吳承虹 said...

More haste, less speed.............................................................

施以王雅玲音 said...

A contented mind is a perpetual feast.............................................................

恭吳丹恭吳丹 said...

所有的資產,在不被諒解時,都成了負債..................................................................

亭亭亭蔡和亭亭亭蔡和 said...

Look before you leap.................................................

文王廷 said...

打聲招呼,祝你一切平安!............................................................

承王蓁 said...

上班好累哦,看看部落格轉換心情~~~先謝謝啦!!............................................................

瑞陳彥 said...

缺少智慧,就是缺少一切..................................................

牧宇 said...

No pains, no gains.......................................................................

怡靜怡靜怡靜怡雯 said...

知識可以傳授,智慧卻不行。每個人必須成為他自己。. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

怡靜怡靜怡靜怡雯 said...

這麼好的文章當然要回應支持(>▽<)..................................................................

孟湖聿軒 said...

唯有穿鞋的人,才知道鞋的哪一處擠腳......................................................................