Teledyne LeCroy User-Defined Decoding (UDD) Advanced Script Language (ASL) Reference Manual User Manual
Page 22

19
CURPOS
Remark
This function returns the current position of the cursor in bits of INPUTDATA.
At first, CURPOS is zero and increases one field’s length in each AddField call.
CURPOS has a local scope in script, that is, in each SubFieldOf statement, CURPOS has a local
scope, too. In each SubFieldOf statement, CURPOS is set to zero and increases one subfield
length. When it returns out of subfield statement, CURPOS value is set to the value that it had
before SubFieldof statement.
Example
F1 = AddField(0, 8, “F1”, “F1”, “F1”);
F2 = AddField(CURPOS, 8, “F2”, “F2”, “F2”);
/* CURPOS is equal to 8 and will be 16 after this statement. */
SubFieldOf(F2)
{
F11 = AddField(0, 2, “F11”, “F11”, “F11”) ;
F12 = AddField(CURPOS, 2, “F12”, “F12”, “F12”) ; /* CURPPOS = 2 */
F13 = AddField(CURPOS, 4, “F13”, “F13”, “F13”) ; /* CURPPOS = 4 */
}
F3 = AddField(CURPOS, 2, “F3”, “F3”, “F3”); /* CURPPOS = 16 */
EOD
Remark
If CURPOS is at the end of data, this function returns TRUE. If not, returns FALSE. That is, if all
input data has been decoded, this function returns TRUE.
INPUTDATA
Remark
INPUTDATA is a symbolic representation of the entire data stream that is passed to the decoder.