Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Command$(count%) - I can't get a value when using the optional argument "(count%)"
#1
Please see the complete program below, and the results of running it with the parameter    one two three.
I do not get a value in the optional argument (count1%).  it is always zero.   Am I reading the WIKI wrong to think that the variable count1% should also contain the value 3 after running the program.

Thanks in advance........


Option _Explicit
Dim cmd$, count1%, count2%
Open "text.txt" For Output As #1
cmd$ = Command$(count1%)
count2% = _CommandCount

Print #1, "Command$="; cmd$
Print #1, "Command$ elements1 cntr  ="; count1%
Print #1, "CommandCount$ elements2  ="; count2%
Print #1, "Command$(0)="; Command$(0)
Print #1, "Command$(1)="; Command$(1)
Print #1, "Command$(2)="; Command$(2)
Print #1, "Command$(3)="; Command$(3)
Print #1, "Command$(4)="; Command$(4)
End


Command$=D:\QBTest\CommandUse.exe
Command$ elements1 cntr  = 0
CommandCount$ elements2  = 3
Command$(0)=D:\QBTest\CommandUse.exe
Command$(1)=one
Command$(2)=two
Command$(3)=three
Command$(4)=
So far, this is the oldest that I've ever been....
And, as the squirrel says, you're not old as long as you know where your nuts are!.
Reply


Messages In This Thread
Command$(count%) - I can't get a value when using the optional argument "(count%)" - by Unatic - 08-21-2025, 09:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  keyword to get the EXE name and the EXE path instead of parsing Command$(0) ? madscijr 8 1,132 07-22-2025, 08:35 PM
Last Post: hsiangch_ong
  Command$ issues eoredson 8 1,344 05-02-2025, 01:42 AM
Last Post: eoredson
  Instr to count occurrences PhilOfPerth 5 929 04-29-2025, 11:17 PM
Last Post: TempodiBasic
  Locate command on the ttf graphical screens Helium5793 5 700 03-09-2025, 05:47 PM
Last Post: SMcNeill
Question fast file find with wildcards, optional date range, match # bytes, binary compare? madscijr 8 1,296 12-19-2024, 03:55 PM
Last Post: SpriggsySpriggs

Forum Jump:


Users browsing this thread: 1 Guest(s)