Lasso Soft Inc. > Home

[Integer->SetFormat]

[Integer->SetFormat] specifies the format in which the integer value will be output when cast to string or displayed to a visitor.

Options include outputting the decimal in hexadecimal notation, and options for padding the output.

  • Syntax
  • Parameters
[Integer Value->(SetFormat:
  -Hexadecimal=Boolean,
  -Padding=Number of Characters to Pad Output,
  -PadChar=Padding Character,
  -PadRight=Boolean]
Required Parameters
Integer Value The variable which contains the integer whose format is being set.
Optional Parameters
-Padding Specifies the desired width in character of the output.
-PadChar Specifies the character which should be used to pad the output. Defaults to a space.
-PadRight If set to True the output will be padded on the right, otherwise it will be padded on the left.
-Hexadecimal If set to True the integer will be output in hexadecimal format.
-GroupChar Specifies the character to use for thousands grouping.
Examples

To output an integer in hexadecimal notation:

Use the [Integer->SetFormat] tag. The following example shows how to format a color value for use in a <font> tag.

[Variable: 'Color'=255]
[($Color)->(SetFormat: -Hexadecimal=True)]
You can't see the <font color="[Variable: 'Color'][Variable: 'Color'][Variable: 'Color']">White Text</font>!
Result:
You can't see the <font color="FFFFFF">White Text</font>!
Tag Link [Integer->SetFormat] Category Math
Type Member Data Source Any
Support Preferred Version 5.0
Output Type None (Modifies in place) Security None
Implementation LCAPI Sets Lasso 7.0, Lasso 6.0, Lasso 5.0

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft