mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-25 00:06:47 +03:00
[Fortran/zh-cn] Simplified Chinese Translation for Fortran 95
This commit is contained in:
parent
bf16388ffa
commit
1b630b37cb
@ -204,9 +204,9 @@ program example !声明一个叫做 example 的程序
|
||||
print *, b !向命令行打印变量 'b'
|
||||
|
||||
! 我们可以格式化输出
|
||||
print "(I6)", 320 !显示 ' 320'
|
||||
print "(I6.4)", 3 !显示 ' 0003'
|
||||
print "(F6.3)", 4.32 !显示 ' 4.320'
|
||||
print "(I6)", 320 !打印 ' 320'
|
||||
print "(I6.4)", 3 !打印 ' 0003'
|
||||
print "(F6.3)", 4.32 !打印 ' 4.320'
|
||||
|
||||
|
||||
! 该字母与数值规定了给定的数值与字符所用于打印输出的类型与格式
|
||||
@ -216,8 +216,8 @@ program example !声明一个叫做 example 的程序
|
||||
|
||||
! 可以同时设定多种格式
|
||||
print "(I5,F6.2,E6.2)", 120, 43.41, 43.41
|
||||
print "(3I5)", 10, 20, 30 !3 repeats of integers (field width = 5).
|
||||
print "(2(I5,F6.2))", 120, 43.42, 340, 65.3 !repeated grouping of formats.
|
||||
print "(3I5)", 10, 20, 30 !连续打印3个整数 (字段宽度 = 5).
|
||||
print "(2(I5,F6.2))", 120, 43.42, 340, 65.3 !连续分组格式
|
||||
|
||||
! 我们也可以从终端读取输入
|
||||
read *, v
|
||||
|
Loading…
Reference in New Issue
Block a user