View previous topic :: View next topic |
Author |
Message |
clint
Joined: 14 Jun 2006 Posts: 37
|
Posted: Tue Jun 27, 2006 7:16 am Post subject: possible bug in FTN95? |
|
|
The following code:
Code: |
MODULE SystemUtilities
IMPLICIT NONE
!
CONTAINS
INTEGER FUNCTION GetEnvStr(key,val)
CHARACTER(LEN=*), INTENT(IN) :: key
CHARACTER(LEN=*), INTENT(OUT) :: val
val = GETENV@(key)
GetEnvStr = LEN(val)
RETURN
END FUNCTION
END MODULE
|
produces the following error:
error 1173 - Only CHARACTER variables can be assigned to CHARACTER variables, found REAL(KIND=1)
val is defined as a variable length character variable.
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Tue Jun 27, 2006 9:29 am Post subject: possible bug in FTN95? |
|
|
Clint
You must declare GETENV@....
CHARACTER(LEN=256)::GETENV@
val = GETENV@(key) |
|
Back to top |
|
|
clint
Joined: 14 Jun 2006 Posts: 37
|
Posted: Wed Jun 28, 2006 2:31 am Post subject: possible bug in FTN95? |
|
|
ooops! |
|
Back to top |
|
|
|