View previous topic :: View next topic |
Author |
Message |
clint
Joined: 14 Jun 2006 Posts: 37
|
Posted: Thu Jun 22, 2006 5:29 am Post subject: GETCOMMANDLINE |
|
|
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 |
|
|
JohnHorspool
Joined: 26 Sep 2005 Posts: 270 Location: Gloucestershire UK
|
Posted: Thu Jun 22, 2006 6:28 am Post subject: GETCOMMANDLINE |
|
|
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 |
|
|
clint
Joined: 14 Jun 2006 Posts: 37
|
Posted: Thu Jun 22, 2006 8:03 am Post subject: GETCOMMANDLINE |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Thu Jun 22, 2006 9:59 am Post subject: GETCOMMANDLINE |
|
|
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 |
|
|
|