标题: union不能用allocatable的问题 [打印本页] 作者: lanxueren121 时间: 2015-3-13 12:58 标题: union不能用allocatable的问题 type T_client_server_message
union
map
character*(500) buffer
end map
map
real,allocatable :: matrix1(:,:)
real,allocatable :: matrix2(:,:)
real,allocatable :: matrix3(:,:)
end map
end union
end type
想如此定义一个新的数据类型
但是出现错误
错误 3 error #7897: A UNION may not contain an ALLOCATABLE component [MATRIX3] C:\Users\Administrator\Desktop\add server.f90 25
错误 2 error #7897: A UNION may not contain an ALLOCATABLE component [MATRIX2] C:\Users\Administrator\Desktop\add server.f90 24
错误 1 error #7897: A UNION may not contain an ALLOCATABLE component [MATRIX1] C:\Users\Administrator\Desktop\add server.f90 23