View previous topic :: View next topic |
Author |
Message |
Anonymous Guest
|
Posted: Sun Nov 28, 2004 6:51 am Post subject: How to use .Net datetime in FTN95 4.6? |
|
|
PROGRAM MainProgram
ASSEMBLY_EXTERNAL(NAME="System.DateTime.ToString") ToString
Object('System.DateTime') :: dat
Character*1 :: chrTest
write(*,*) Char(String@(ToString(dat)))
Read(*,*) chrTest
END PROGRAM
This code can be run, but I can not use
dat%Now
dat%UtcNow
...
Compiler will tell me:
D:LifeNetfortransalfordchineseFreeFormat1.F95(14): error 1140 - Member now is not a property or simple field in OBJECT('System.DateTime')
|
|
Back to top |
|
|
silverfrost Site Admin
Joined: 29 Nov 2006 Posts: 191 Location: Manchester
|
Posted: Sun Nov 28, 2004 8:02 am Post subject: How to use .Net datetime in FTN95 4.6? |
|
|
[small]TLCheng wrote:[/small]
This code can be run, but I can not use
dat%Now
dat%UtcNow
Why?
------------
Administrator
Silverfrost Forums |
|
Back to top |
|
|
Anonymous Guest
|
Posted: Sun Nov 28, 2004 8:29 am Post subject: How to use .Net datetime in FTN95 4.6? |
|
|
Because FTN95 Compiler has error message.
Compiler will tell me:
D:LifeNetfortransalfordchineseFreeFormat1.F95(14): error 1140 - Member now is not a property or simple field in OBJECT('System.DateTime')
line 14 is
write(*,*) Char(String@(ToString(dat))) -> write(*,*) Char(String@(ToString(dat%Now)))
|
|
Back to top |
|
|
silverfrost Site Admin
Joined: 29 Nov 2006 Posts: 191 Location: Manchester
|
Posted: Fri Dec 03, 2004 5:33 am Post subject: How to use .Net datetime in FTN95 4.6? |
|
|
Which is correct.... system.datetime.now is not a simple property or field. It is an instantiated class not a simple value.
------------
Administrator
Silverfrost Forums |
|
Back to top |
|
|
Anonymous Guest
|
Posted: Sat Dec 04, 2004 6:17 am Post subject: How to use .Net datetime in FTN95 4.6? |
|
|
I want test to use ado.net connect database in FTN95 4.6.
So, I want try System.DateTime in .Net framework first.
It is a spical data type in Fortran.
However, how can I use DateTime.Now?
ps. I'm very happy that FTN95 4.6 can run at Chinese Windows. Lahey Fortran.Net can not run at Chinese Windows. |
|
Back to top |
|
|
|