Percentage Screen display values show the default value entered into the parameter dialog's Default Value field, unless the Blox is attached to a Suite and the user has changed the Main screen displayed value.  When entering a value into the dialog's Default Value field use the decimal equivalent for the percentage display required.

 

When changing the value of the Main screen's displayed percentage display, a percentage number should be used.  For example, if you enter a 20 into the Main screen parameter display, it will display 20%, and it will be equivalent to 0.20 decimal when applied as as a script value.  If you enter a value of 0.20 it will be displayed as 0.20% and be equivalent to 0.02 decimal in a code statement.

 

Data-Type:

Description:

Percent

Default value entered must be as a decimal where 0.10.  When this parameter appears on the main screen page it will be displayed as 10%.  In calculations it will be applied as a decimal where 10% is applied as 0.10.

 

Dialog Example:

Click to Enlarge; Click to Reduce.

Percent Parameter Selection Example

Parameter Menu Example:

Click to Enlarge; Click to Reduce.

Percent Parameter Menu Example

 

Example:

Variables:  AmountIs, NumberIs Type: Floating
 
'  Assign a value
AmountIs = 1000
 
'  Using the Dialog variable name above,...
NumberIs = AmountIs * PercentValue
 
'  Send number results to Log Window
PRINT "NumberIs = ", NumberIs

 

Returns:

NumberIs =  100.000000000

 

Links:

Constants Reference

See Also:

Data Group and Types

 


Edit Time: 9/12/2020 10:28:46 AM


Topic ID#: 459

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software