178
15
0
大宗师
使用道具 举报
955
大师
838
2
01
program
test
02
type
matrix
(
kind
,
n
)
03
integer
::
=
0.0d0
! gives a default value
04
len
! no default value given
05
real
arr
06
end
07
0.0
a
08
4
:
allocatable
b
09
%
[
1
]
10
11
print
*
12
3
13
14
pause
1.png (35.09 KB, 下载次数: 418)
下载附件
2018-10-18 19:15 上传
vvt 发表于 2018-10-18 19:14 Type :: PMat(k) INTEGER(KIND=4),KIND :: k REAL(KIND=8) , allocatable :: M(:,:)
li913 发表于 2018-10-18 19:16 我用ivf17.0, 这个功能好像还不健全。[mw_shl_code=fortran,true]program test type matrix(kind,n) in ...
liudy02 发表于 2018-10-18 20:56 谢谢大神的回复 您的意思是直接放弃派生类型的LEN型参数,而是用不定结构数组或者指针来实现同样的功能? ...
vvt 发表于 2018-10-19 08:50 我是觉得可分配数组比 Integer , len 更灵活。 type(matrix(kind=4,n=2)) :: a(100)
li913 发表于 2018-10-19 10:29 标准虽然提出来了,但是对编译器厂商而言:1、不一定能够实现;2、可选择性实现某些功能;3、暂时没有实现 ...
本版积分规则 发表回复 回帖后跳转到最后一页
颁发给完成“有规有矩”任务的网友
颁发给论坛注册3年以上的网友
颁发给注册后积极发言的新人
颁发给发帖量超过一定数量的坛友
颁发给论坛热心帮助他人的网友
捐赠本站|Archiver|关于我们 About Us|小黑屋|Fcode ( 京ICP备18005632-2号 )
GMT+8, 2025-4-16 03:56
Powered by Discuz! X3.4
© 2013-2025 Comsenz Inc.