Lasso Soft Inc. > Home

[Local]

[Local] either defines a new local variable or returns the value of an existiing local variable. [Local] is also used to define and return the value of instance variables within custom types.

The [Local] tag can be used within the contents of a custom tag definition. When the tag is used within [Define_Tag] ... [/Define_Tag] tags the value of the local variable will only be available within the custom tag. Local variables will not conflict with page variables of the same name or with local variables of the same name in different custom tag definitions.

The [Local] tag can also be used within the contents of a custom type definition. When the tag is used within [Define_Type] ... [/Define_Type] tags, the value of the instance variable will only be available within the custom type. Instance variables can be referenced using [Type->'VariableName'].

  • Syntax
  • Parameters
[Define_Tag]
  [Local: 'Local Variable Name', Encoding Keyword]
[/Define_Tag]

[Define_Tag]
  [Local: 'Local Variable Name'='Local Variable Value']
[/Define_Tag]

[Define_Type]
  [Local: 'Instance Variable Name'='Instance Variable Value']
[/Define_Type]
Optional Parameters
Variable Name The name of the variable for which the current value should be returned.
Variable Name and Value A variable with the specified name is created and set to the specified value.
Encoding Keyword Only affects the value of a variable which is returned, not the value of a variable which is set.
Examples

To define a local variable within a custom tag definition:

Use the [Local] tag. The following custom tag definition includes a local variable named PrivateValue. The local variable is set to the current date and then its value is returned.

[Define_Tag: 'Example']
  [Local: 'PrivateValue'=(Server_Date: -Extended)]
  [Return: (Local: 'PrivateValue')]
[/Define_Tag]
Result:
2001-09-20
Tag Link [Local] Category Variable
Type Substitution Data Source Any
Support Preferred Version 5.0
Output Type Any Security Tag
Implementation Internal Sets 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