Lasso Soft Inc. > Home

[ generateSeries ]

Type

[GenerateSeries] creates a type consisting of a set of sequential values. The type requires two integer parameters, and optionally a third integer parameter.

The first parameter (-from) designates the start value.

The second parameter (-to) designates the end value.

The third parameter (-by) designates the value by which successive values in the sequence should increase or decrease. A positive value will increase, and a negative value will decrease, provided that direction correlates with the first two parameters. By default, -by is equal to 1.

  • Syntax
  • Methods
  • Traits
generateseries(Integer Value, Integer Value)
generateseries(Integer Value, Integer Value, Integer Value)
Has methods:
  • generateSeries->oncreate(FROM, to, by = ?)
  • generateSeries->by()
  • generateSeries->by=(by)
  • generateSeries->FROM()
  • generateSeries->from=(FROM)
  • generateSeries->init()
  • generateSeries->init=(init)
  • generateSeries->to()
  • generateSeries->to=(to)
  • generateSeries->forEach()
Examples
  • Beginner

To generate a sequence of integers:

Use the [generateSeries] type. The following examples generate varies sequences of integers.

Code

generateSeries(1, 5)
'<br>'
generateSeries(1, 5, 2)
'<br>'
generateSeries(5, 1, -2)

Result

1, 2, 3, 4, 5
1, 3, 5
5, 3, 1

Recent Comments

No Comments found

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