Browse Prior Art Database

Label Creation Through Recursive Calling Macro

IP.com Disclosure Number: IPCOM000050359D
Original Publication Date: 1982-Oct-01
Included in the Prior Art Database: 2005-Feb-10
Document File: 2 page(s) / 75K

Publishing Venue

IBM

Related People

Feeley, PM: AUTHOR

Abstract

A macro facility in a programming language is an extension of the language which simplifies the coding of a program.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 97% of the total text.

Page 1 of 2

Label Creation Through Recursive Calling Macro

A macro facility in a programming language is an extension of the language which simplifies the coding of a program.

In many macros, the system variable symbol &SYSNDX (Macro Instruction Index) has been concatenated with a group of characters to create unique names or labels. &SYSNDX is initially assigned a four-digit number 0001, which is incremented by one for each macro instruction processed. The &SYSDNX value remains constant throughout the macro, and therefore must be concatenated each time with different characters, if additional names are to be created within the macro.

&SYSNDX may not be used in statements outside macro-definitions, since the &SYSDNX-contained names can vary as any macro is added or deleted in the program.

To eliminate this problem, a technique can be used in which a macro- generated list of names is placed in a subscripted global set symbol array, permitting usage by statements both inside and outside macro-definitions.

A macro (GENLAB) may be written to generate the labels-names through recursive calling. The macro is passed a count of the number of names desired and the characters the names are to begin with. The labels which are created are placed in a global set array. The array must be declared as a global in any program and macro referring to the array. Fig. 1 contains an example of a source program using the

technique.

Fig. 2 contains the compiled program.

1

Page 2 of 2

2

[This page c...