====== < > Angle Brackets operator ====== ==== Description ==== Use the angle brackets operator ( < > ) to replace data in dynamic string arrays, or to extract data from them. ==== Syntax ==== //result// = //variable//**<**//field//**>**// result// = //variable//**<**//field//, //value//**>**// result// = //variable//**<**//field//, //value//, //subvalue//**>** ==== Parameters ==== The Angle brackets operator has the following parameters. ^Parameter^Description^ |//Variable//|Designates the dynamic array that contains the data to be extracted or replaced.| |//field, value,// and //subvalue//|Specifies the location of the data to be extracted or replaced in the dynamic array. //field//, //value//, and //subvalue// may be integer values or any expression that yields integer values.\\ || ==== Remarks ==== If the angle bracket syntax appears on the left side of an assignment statement, then a dynamic [[replace|Replace()]] will occur. For example: CUST_REC<3,2> = 'JEFFERSON' is equivalent to CUST_REC = Replace( Cust_Rec,3,2,0, 'JEFFERSON') In this example, the third field, second value is replaced with the string "JEFFERSON". Notice that the 0 (zero) is required in the Replace syntax but not in the angle bracket syntax. Also notice that there is no space between the variable name and the first angle bracket. Note: The variable must first be initialized before assigning a value with angle bracket operators. If the angle bracket syntax is used in any expression to the right of an assignment statement, then an [[extract|Extract]] is implied. Notice that: NAME = REC<4> is equivalent to NAME = Extract(REC,4,0,0) ==== Example ==== * Extract the third field, Nth value. INV.DT = MASTER<3,N> /* Extract the fifth field, Nth value, and subvalue number that is yielded by LINE + 1. */ PROD = MASTER<5,N,LINE + 1> /* Replace the sixth field, Nth value of MASTER with the second field of PM. */ MASTER<6,N> = PM<2> * Replace field four of MASTER with "WALL CONSTRUCTION". MASTER<4> = 'WALL CONSTRUCTION'