forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to use .Net datetime in FTN95 4.6?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Sun Nov 28, 2004 6:51 am    Post subject: How to use .Net datetime in FTN95 4.6? Reply with quote

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

PostPosted: Sun Nov 28, 2004 8:02 am    Post subject: How to use .Net datetime in FTN95 4.6? Reply with quote

[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
View user's profile Send private message Visit poster's website
Anonymous
Guest





PostPosted: Sun Nov 28, 2004 8:29 am    Post subject: How to use .Net datetime in FTN95 4.6? Reply with quote

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

PostPosted: Fri Dec 03, 2004 5:33 am    Post subject: How to use .Net datetime in FTN95 4.6? Reply with quote

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
View user's profile Send private message Visit poster's website
Anonymous
Guest





PostPosted: Sat Dec 04, 2004 6:17 am    Post subject: How to use .Net datetime in FTN95 4.6? Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group