Lasso Soft Inc. > Home

[Return_Value]

[Return_Value] can be used in a [PostCondition] tag to inspect the result that is being returned from a custom tag.

Since no code after a [Return] tag will be executed within a custom tag it cannot be used to inspect the return value from a custom tag except in a [PostCondition].

  • Syntax
  • Parameters
[Return_Value]
Optional Parameters
Encoding Keyword Specifies the encoding for the tag's return value. Tags are encoded using -EncodeHTML by default if their value is output on a format file. No encoding is applied to nested tags unless an explicit encoding keyword is specified. One of -EncodeBreak, -EncodeHTML, -EncodeNone, -EncodeRaw, -EncodeSmart, -EncodeStrictURL, -EncodeURL, -EncodeXML.
Examples

To define a tag that only returns values of a certain data type:

Use the [Return_Value] tag to fetch the data type of the return value in a [PostCondition] tag. The following example returns the first parameter to the tag and throws an error if that value is not an array.

[Define_Tag: 'ArrayOnly']
  [PostCondition: (Return_Value)->Type == 'array']
  [Return: (Params)->(Get: 1)]
[/Define_Tag]
Tag Link [Return_Value] Category Custom Tag
Type Substitution Data Source Any
Support Preferred Version 5.0
Output Type Any Security Tag
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, 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