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 

GETCOMMANDLINE

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



Joined: 14 Jun 2006
Posts: 37

PostPosted: Thu Jun 22, 2006 5:29 am    Post subject: GETCOMMANDLINE Reply with quote

How do you use the GETCOMMANDLINE function please?

It has been declared in win32api.ins as:
Code:
STDCALL GETCOMMANDLINE 'GetCommandLineA':INTEGER*4


The manual for GetCommandLineA gives the following declaration:

Code:
LPTSTR GetCommandLine(void);



(I know that Fortran2003 has GET_COMMAND & GET_COMMAND_LINE which you can use in Salford)



thanks
Clint
Back to top
View user's profile Send private message
JohnHorspool



Joined: 26 Sep 2005
Posts: 270
Location: Gloucestershire UK

PostPosted: Thu Jun 22, 2006 6:28 am    Post subject: GETCOMMANDLINE Reply with quote

Clint

Will the Salford FTN95 function "COMMAND_LINE" or "CMNAM" do what you require?

Not being direct API calls they are very simple to use.

John
_________________
John Horspool
Roshaz Software Ltd.
Gloucestershire
Back to top
View user's profile Send private message Visit poster's website
clint



Joined: 14 Jun 2006
Posts: 37

PostPosted: Thu Jun 22, 2006 8:03 am    Post subject: GETCOMMANDLINE Reply with quote

They will do but I wanted to know how the the win32api should be used (out of interest). The function appears to be unusable as it is defined in the header.

Useful if I come acorss another function without an F2003 equivalent.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Thu Jun 22, 2006 9:59 am    Post subject: GETCOMMANDLINE Reply with quote

Clint

GetCommandLine is really not very useful in a Fortran context.

However here is some simple code for what it is worth....

include "windows.ins"
integer addr
character*100 c
character cc
c = ' '
addr = GetCommandLine()
do i=0,99
cc = ccore1(addr+i)
if(ichar(cc) == 0) exit
c(i+1:i+1) = cc
enddo
print*,c
end
Back to top
View user's profile Send private message AIM Address
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