Difference between revisions of "GET UTIL PROC FIELD NAME"
From Macros Wiki
Line 14: | Line 14: | ||
The variable fieldName$ will be set to the name of the 5th field in process number 2. | The variable fieldName$ will be set to the name of the 5th field in process number 2. | ||
+ | ===Example Macro=== | ||
To show a list of all data fields in process number 1, with the values of those data fields: | To show a list of all data fields in process number 1, with the values of those data fields: | ||
Line 21: | Line 22: | ||
FOR iField=1 TO iNumFields | FOR iField=1 TO iNumFields | ||
− | GET_UTIL_PROCESS_FIELD_NAME 1, iField, f$ | + | :GET_UTIL_PROCESS_FIELD_NAME 1, iField, f$ |
− | GET_UTIL_PROCESS_DATA 1, f$, dd | + | :GET_UTIL_PROCESS_DATA 1, f$, dd |
− | a$ = a$ + crlf$ + "%iField = %f$ = %dd" | + | :a$ = a$ + crlf$ + "%iField = %f$ = %dd" |
− | EVAL_TEXT a$ | + | :EVAL_TEXT a$ |
NEXT iField | NEXT iField | ||
Latest revision as of 19:00, 3 June 2020
Contents
Command
- GET_UTIL_PROC_FIELD_NAME <process number>, <field number>, <field name>
- Get the number of data fields in a utility process.
Parameters
- <process number>
- Process number.
- <field number>
- Field number (between 1 and the number of data fields)
- <field name>
- String variable to be set to the field name
Example
- GET_UTIL_PROC_FIELD_NAME 2, 5, fieldName$
The variable fieldName$ will be set to the name of the 5th field in process number 2.
Example Macro
To show a list of all data fields in process number 1, with the values of those data fields:
GET_UTIL_PROCESS_NUM_FIELDS 1, iNumFields
a$ = "Num Fields = %iNumFields"
FOR iField=1 TO iNumFields
- GET_UTIL_PROCESS_FIELD_NAME 1, iField, f$
- GET_UTIL_PROCESS_DATA 1, f$, dd
- a$ = a$ + crlf$ + "%iField = %f$ = %dd"
- EVAL_TEXT a$
NEXT iField
MESSAGE a$