Error getting tags :
error 404Error getting tags :
error 404 each | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
each
Basics
Expander triangle
Type
Keyword
Syntax
Introduced
1.0
Changed
1.1
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Used with the sort container command to specify that the sort key consists of the specified chunk of each line or item. Also used with the for keyword in a repeat control structure to specify that the repeat loop should be executed for each chunk of the specified string or each element of the specified array.
Examples

sort lines of field "Address" by word 2 of each
repeat for each character thisChar in field "Input"

Additional Comments
Expander triangle

Use the each keyword to sort a container by a portion of each item or line, rather than by the whole item or line, or to iterate over each chunk in a string or each element in an array.

Comments:

In a sort container command, the expression before "of each" must be a chunk expression. The chunk expression describes a portion of each item or line in the container to be sorted.

If a chunk is nonexistent for a particular line or item--for example, if "by char 5 of each" is specified and some lines only have four characters--the chunk is treated as though it were empty.

Changes to Revolution:

The ability to specify each element of an array in a repeat control structure was introduced in version 1.1. In previous versions, you could use the each keyword to iterate over all chunks in a string, but not over all elements in an array.

User Comments
Expander triangle