View previous topic :: View next topic |
Author |
Message |
RichardMay
Joined: 02 May 2006 Posts: 25
|
Posted: Thu Mar 29, 2007 4:01 pm Post subject: Long command arguments |
|
|
Paul,
I'm still wating for a reply to my last posting on this, on 27-Feb. Although the new salflibc.dll that you sent seems to solve the problem for the release version, it does not work in the debugger. Is there a way around this or do I have to debug the old-fashioned way with write statements?
Regards,
Richard May |
|
Back to top |
|
|
silverfrost Site Admin
Joined: 29 Nov 2006 Posts: 191 Location: Manchester
|
Posted: Thu Mar 29, 2007 8:14 pm Post subject: |
|
|
Richard
How long are your command lines? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7927 Location: Salford, UK
|
Posted: Fri Mar 30, 2007 8:31 am Post subject: |
|
|
Richard
I have had another look at this and it is not clear to me why there
should be a difference when debugging.
I have increased the buffer size in other places just for good measure
and I will send you another dll.
You could just check to make sure that you are not accessing an
old copy of salflibc.dll when debugging.
If the next dll that I will send does not help then we will need details of how you are running the debugger (from a command line or Plato or VS) and perhaps also some sample code. |
|
Back to top |
|
|
RichardMay
Joined: 02 May 2006 Posts: 25
|
Posted: Fri Mar 30, 2007 9:50 am Post subject: |
|
|
Paul,
This dll seems better. When I run the test program below in the debugger larg is reported correctly although the full string is not displayed.
program argtest
character*160 carg
call get_command_argument(1,carg,larg)
write(*,1001)carg
1001 format(a160)
stop
end
I compile this in command mode using FTN95 /check. I run it using the following batch file.
argtest "1abcdefghijklmnopqrstuvwx
2abcdefghijklmnopqrst vwx3abcdefghijklmnopqrstuvwx
4abcdefghijklmnopqrstuvwx5abcdefghijklmnopqrstuvwx
6abcdefghijklmnopqrstuvwx"
The argument is 150 long in groups of 25 characters with one space. In my file there are no carriage returns but this posting failed when I put the whole thing in as one word. I run the debugger from a command line as well, then paste the command above into the window.
This may seem a strange thing to worry about, but we sell analysis software to engineering consultancies. Modern engineers who have grown up with windows try to run our program in directories like
c:\documents and settings\engineering\my documents\projects
\company name\project title\hydrodynamics\model 1\low damping\results ....
I'm sure you get the idea. When you drop a data file onto a desktop icon the entire path is passed to the program.
Richard |
|
Back to top |
|
|
|