beautypg.com

Repeat, Repeat count – Teledyne LeCroy User-Defined Decoding (UDD) Advanced Script Language (ASL) Reference Manual User Manual

Page 17

background image

14

Repeat

Repeat Expression

Block

Remark

This statement repeats all commands in block until Expression is TRUE.

Example


F1 = AddField(0, 20, "Field1", "It starts form bit# 2", "F1");
F2 = AddField(20, 40, "Field2", "This field is used for..", "F2");
F31 = GetData(32, 10);

/* This loop will repeat till current position > 34 (in bits). */
Repeat CURPOS < 100
{
F1 = AddField(CURPOS, 23, "SubField of field f1", "subfield of f1",
"subfield");
}


Repeat Count

Repeat Count = Expression
Block


Remark

This statement repeats all commands in block as many as value of Expression.

Example

F1 = AddField(2, 3, "Field1", "It starts form bit# 2", "F1");
F2 = AddField(2, 3, "Field2", "This field is used for..", "F2");
F31 = GetData(32, 343);
F31 = GetData(0b01010101, 349843);

/* This loop will be run 2 times. */
Repeat Count = 2
{
F1 = AddField(CURPOS, 23, "SubField of field f1", "subfield of f1",
"subfield");
}