Difference between revisions of "GET UTIL PROC FIELD NAME"
From Macros Wiki
(Created page with "{{Up}} {{Command|syntax=GET_UTIL_PROC_FIELD_NAME <process number>, <field number>, <field name> |description=:Get the number of data fields in a utilit...") |
|||
Line 13: | Line 13: | ||
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. | ||
+ | |||
+ | 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$ | ||
[[Category:Procs]] | [[Category:Procs]] |
Revision as of 18:59, 3 June 2020
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.
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$