what_return_field_from_group_.htm
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
what_return_field_from_group_.htm [2021/04/15 15:57] – external edit 127.0.0.1 | what_return_field_from_group_.htm [2021/07/27 04:49] (current) – Fix & to &= carlbarnes | ||
---|---|---|---|
Line 13: | Line 13: | ||
The **WHAT** statement returns the //number// specified field from a //group// structure. Generally, this would be assigned to an ANY variable. If the number specified field is a dimensioned field, then WHAT returns a reference to the // | The **WHAT** statement returns the //number// specified field from a //group// structure. Generally, this would be assigned to an ANY variable. If the number specified field is a dimensioned field, then WHAT returns a reference to the // | ||
- | If the field with an ordinal position equal to the passed second parameter is defined as an ANY type or has the DIM attribute, the returned value can only be used in " | + | If the field with an ordinal position equal to the passed second parameter is defined as an ANY type or has the DIM attribute, the returned value can only be used in " |
**Return Data Type: **ANY | **Return Data Type: **ANY | ||
Line 19: | Line 19: | ||
**Example: | **Example: | ||
- | **MyGroup | + | < |
- | + | MyGroup | |
- | **F1 LONG(3) | + | F1 LONG(3) |
- | + | F2 SHORT | |
- | **F2 SHORT !Field number 2** | + | F3 STRING(30) |
- | + | InGroup | |
- | **F3 STRING(30) | + | F1 LONG !Field number 5 |
- | + | F2 SHORT(2) | |
- | **InGroup | + | F3 STRING(30), |
- | + | F4 LONG, | |
- | **F1 LONG !Field number 5** | + | F5 ANY |
- | + | END | |
- | **F2 SHORT(2) | + | |
- | + | ||
- | **F3 STRING(30), | + | CurrentField ANY |
- | + | ||
- | **F4 LONG, | + | CODE |
- | + | CurrentField &= WHAT(MyGroup, | |
- | **F5 ANY** | + | CurrentField &= WHAT(MyGroup, |
- | + | CurrentField &= WHAT(MyGroup, | |
- | ** END** | + | IF CurrentField &= RefVar |
- | + | CurrentField = 2 !INVALID | |
- | ** END** | + | END |
- | + | CurrentField &= WHAT(MyGroup, | |
- | **CurrentField ANY** | + | CurrentField &= WHAT(MyGroup, |
- | + | ||
- | ** CODE** | + | !For String Comparison, the returned field must be moved into a work field: |
- | + | CurrentField &= WHAT(MyGroup, | |
- | ** CurrentField &= ****WHAT****(MyGroup, | + | IF CurrentField = ' |
- | + | !do something | |
- | ** CurrentField &= ****WHAT****(MyGroup, | + | END |
- | + | </ | |
- | ** CurrentField &= ****WHAT****(MyGroup, | + | |
- | + | ||
- | ** IF CurrentField &= RefVar | + | |
- | + | ||
- | ** CurrentField = 2 !INVALID | + | |
- | + | ||
- | ** END** | + | |
- | + | ||
- | ** CurrentField &= ****WHAT****(MyGroup, | + | |
- | + | ||
- | ** CurrentField &= ****WHAT****(MyGroup, | + | |
- | + | ||
- | **!For String Comparison, the returned field must be moved into a work field: | + | |
- | + | ||
- | ** CurrentField &= ****WHAT****(MyGroup, | + | |
- | + | ||
- | ** IF CurrentField = ' | + | |
- | + | ||
- | ** !do something** | + | |
- | + | ||
- | ** END** | + | |
**See Also:** | **See Also:** |
what_return_field_from_group_.htm.txt · Last modified: 2021/07/27 04:49 by carlbarnes