PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • General properties on the parameters of a procedure
  • Handling the parameters of a procedure
  • Specific properties that can be used on each parameter of a procedure
  • Re-stacking parameters
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
MyParameters (Reserved word)
In french: MesParamètres
The MyParameters keyword is used to handle the parameters passed to a WLanguage procedure. It allows you to access the advanced information about the parameters of the current WLanguage procedure.
You have the ability to handle all the parameters or a single parameter.
This keyword can be used in the standard WLanguage procedures and in the WLanguage procedures with a variable number of parameters.
Versions 17 and later
WEBDEV - Browser code This feature is available for the procedures in Browser code.
New in version 17
WEBDEV - Browser code This feature is available for the procedures in Browser code.
WEBDEV - Browser code This feature is available for the procedures in Browser code.
Example
// Procédure de décalage de champs
PROCÉDURE DécaleChamp(*)
 
// Ce code utilise une boucle de type POUR ... _A_
// pour ne pas recalculer le nombre de paramètres à chaque itération
// En effet, ce nombre de paramètres est fixe.
FOR I = 1 _TO_ MyParameters..Count
MyParameters[I]..X += 10
END
Syntax
MyParameters
Remarks

General properties on the parameters of a procedure

Two properties can be used on all the parameters of a WLanguage procedure:
Property nameEffect
NbReceivedReturns the number of parameters actually received by the current WLanguage procedure.
OccurrenceReturns the number of parameters that can be used in the current WLanguage procedure.
WEBDEV - Browser code This property is not available.
Example: PROCEDURE Proc(p1, po2= "Y", po3 = "Z")
CallProc("A")Proc("A", "B")Proc("A","B", "C")
MyParameters..NbReceived123
MyParameters..Count333
The special parameter "*" (that is used to keep the default value) is counted as a received parameter.

Handling the parameters of a procedure

The classical WLanguage manipulations are available on each of the parameters of an Procedure thanks to the notation MyParameters[ N] where N is the number of the parameter to handle.
For example:
  • MyParameters[N]: Retrieves the value of the Nth parameter of the procedure.
  • MyParameters[N] =: Assigns the value of the Nth parameter of the procedure.
  • MyParameters[N]++, MyParameters[N]+=, ...: Combined arithmetic operations.
  • MyParameters[N]..<Property Name>: Access to a property of the element.
  • MyParameters[N][...]: Access to the subscripted sub-elements of parameter value.
  • MyParameters[N].<Sub-element>: Access to a sub-element of parameter value.
  • MyParameters[N]:<Member>: Access to a member of parameter value
  • MyParameters[N]>>xxx: Automation syntax.
Remark: The type of a parameter is returned by GetDefinition.

Specific properties that can be used on each parameter of a procedure

The following properties can be used on the parameters received by a procedure:
Property nameEffect
DefaultUsed to find out whether the value of the parameter is the one passed by default or if it was explicitly specified.
ByAddress /
Versions 24 and later
ByReference
New in version 24
ByReference
ByReference
Used to find out whether the parameter was passed by default or by address.
WEBDEV - Browser code These properties are not available in browser code.

Re-stacking parameters

MyParameters is used to easily re-stack the parameters of a WLanguage procedure: the parameters (or some of the parameters) of the current procedure can be passed to another procedure or to a WLanguage function.
The possible syntaxes are:
  • MyParameters: re-stacks all the parameters of the procedure.
  • MyParameters[2 TO]: re-stacks all the parameters of the procedure from the second one.
  • MyParameters[TO 3]: re-stacks all the parameters of the procedure up to the third one (inclusive).
  • MyParameters[2 TO 4]: re-stacks all the parameters of the procedure from the second one to the fourth one (inclusive).
  • MyParameters[ 2 OF 3]: re-stacks three parameters of the procedure from the second one.
  • MyParameters[*]: re-stacks the additional parameters.
Remark: No WLanguage error occurs if the requested parameters do not exist: the missing parameters are ignored.
Example: Overriding Open used to write into a trace file:
PROCÉDURE Open(NomFen, *)
Trace(NomFen)
Open(NomFen, MyParameters[2 TO ])
WEBDEV - Browser code This feature is not available.
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment