Knowing the name of a function means very little if you don't know what that function does or how to properly use it. Parameter Info helps take the guess work out of calling functions by displaying relevant information about the function and the parameters it takes.
For VBScript, the parameter information is automatically displayed when you type the
( character or the
space character if the name appearing before the character you typed is a recognized function name since typing these characters indicates you are ready to begin populating the parameters.
Continuing the previous example, type a
space character after the text
StrComp. The parameter information will be displayed.
The parameter information for
StrComp tells you the details about the function call as well as the current parameter;
string1. You will also notice up and down arrows displayed on either side of the text
1 of 2 (upper-left corner of the parameter info). This indicates that there are two ways to call the same function, commonly referred to as overloads of a function.
In the case of the
StrComp function, a third parameter (
compare) parameter is optional. This means you can call
StrComp two ways; once using just the
string2 parameters or a second way with all three parameters.
By either using the Up and Down cursor keys or by clicking the corresponding "Up" and "Down" images in the parameter information tooltip, you can cycle between the available uses of a function. Press the Down cursor key until the parameter information displays item
2 of 2 to show the second overload of
StrComp that includes the third parameter
While not the case for the
StrComp function, the description of some functions may change based on the context of which overload you plan to use since each overload may have a slightly different purpose. After the text
StrComp (including the space) in the editor, continue the code example by typing the text
"FRIDAY", (including the quotation marks and comma). Note that after you typed the comma, the parameter information changed to reflect the details of the second parameter,
string2, as illustrated in the following image:
Use the Left cursor key to move the caret back to the text
"FRIDAY", and you will see the parameter information change back to showing details of the first parameter. This contextual switching of the parameter information ensures you are always seeing information relevant to the current parameter in the function call. Press the Esc key at any time to hide the parameter information. Select Edit -> IntelliSense -> Parameter Info from the main menu to re-display the parameter information after it is dismissed.