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,
  -Padding=Number of Characters to Pad Output,
  -PadChar=Padding Character,
  -PadRight=Boolean]
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 specified the output will be padded on the right, otherwise it will be padded on the left.
-Hexadecimal If specified, the integer will be output in hexadecimal format.
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)]
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 Sets 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