#1 09 Nov 2017 11:56

Pyprohly
Member
Registered: 26 Nov 2014
Posts: 9

WScript.Arguments.Unnamed

In the page on VBScript command line arguments under the heading “Positional arguments” it talks about WScript.Arguments, but this collection contains both the positional and named arguments. The WScript.Arguments.Unnamed collection contains the positional arguments.


cscript.exe demo.vbs file1.txt file2.txt file3.txt

[demo.vbs]

Set colArgsUnnamed = WScript.Arguments.Unnamed
For i = 0 to colArgsUnnamed.Count - 1
	WScript.Echo "Processing file " & colArgsUnnamed.Item(i)
Next

And the first link in the body of that page is broken.


Also, on VBS functions, I don’t think “VBScript mathematical functions” is an accurate title. Maybe “VBScript builtin functions” suits is better.

Offline

#2 10 Nov 2017 02:02

Simon Sheppard
Super Administrator
Registered: 27 Aug 2005
Posts: 902
Website

Re: WScript.Arguments.Unnamed

I have updated both those pages now.

Thanks for the suggestions  smile

Offline

#3 10 Nov 2017 11:10

Pyprohly
Member
Registered: 26 Nov 2014
Posts: 9

Re: WScript.Arguments.Unnamed

I’m not crazy about that definition: “The Unnamed property will return a collection of the unnamed arguments”.

Terminology-wise, positional arguments and unnamed arguments are the same thing, but it’s uncommon to refer to them as “unnamed arguments”. A more relatable definition: “The Unnamed property will return a collection of the positional arguments”. Just my 2c.

And that link to https://ss64.com/vb/cscript%20own is still broken.

Offline

#4 10 Nov 2017 20:22

Simon Sheppard
Super Administrator
Registered: 27 Aug 2005
Posts: 902
Website

Re: WScript.Arguments.Unnamed

OK good points, I have fixed those now

Thanks again

Offline

Board footer

Powered by FluxBB