LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Creazy Commandline

hi all,

I have a problem with the commandline-args using CVI901. never had such a behaviour.
I give a string like "1 2" at the commandline to my program.
the intellisense-help tells me, that I have a argc=3 - just like awaited. but the software seems to have an argc-value of 5. If I put the value to the console a 5 appears and the software is just working this way. totally confused! I attached a screenshot.

any idea ?

best regards

Simon
0 Kudos
Message 1 of 4
(3,103 Views)

Hey Simon - 

 

That's a pretty baffling picture you've got there...  A couple of us have tried to reproduce what you're seeing, and none of us have been able to.  If you do something like this: 

 

while (--argc)
    puts("Test");

 

do you get 3 Tests or 5?  Also, what happens if you explicitly do this: 

 

printf("The parameter-number is %d!!!", 3);

 

Also - are the results the same if you use sprintf instead of printf?

 

Finally, do you think you could post a very simple example that reproduces this on your machine?  Also, be sure to include both the .prj file and .cws file so that we can make sure we are matching all of your configurations.  

 

Thanks!

 

NickB

National Instruments  

Message Edited by nickb on 06-11-2009 04:46 PM
0 Kudos
Message 2 of 4
(3,045 Views)
hi nick,

just this morning I switched on my computer and cannot reproduce the effect. but I saw this yesterday in two projects using the commandline (and was not drunken). anywhere - I attached the project which made the creazy picture I sent to you yesterday as a zip.

best regards

Simon
0 Kudos
Message 3 of 4
(3,033 Views)

Hi folks,

 

I got interested by this post an tried it my self with the zip file data. And I cant reproduce it either. System is CVI 9 on WinXP.

 

 calling line in Commandline: cmdLine_dbg.exe 5

answer of the program:

response.jpg

 I've inserted a simple getchar() to keep the command line up.

 

Hope you figure that out. Greetings Martin

 

 

Message Edited by <The M> on 06-12-2009 05:30 AM
#############################################
There is no place like 127.0.0.1
#############################################
0 Kudos
Message 4 of 4
(3,018 Views)