Teledyne-lecroy UWBTrainer Exerciser Script Language Manual de usuario Pagina 97

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 124
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 96
LeCroy Corporation UWBTrainer Exerciser - Generation Script Language Reference Manual
89
10.13 Preprocessor If Operator
A special preprocessor directive includes/excludes different parts of generation code depending
on some condition.
Examples
Main
{
x = 180
y = 30
# Short if operator with only a 'then' clause
if( x > y )
{
# This block is parsed the usual way and all instructions
# are added to the current instruction block.
Send TX_FRAME
Send MMC_FRAME( Delay = 2000 )
}
if( x < y )
{
# This block is parsed in a special way:
# Only the "{" "}" are taken into account.
# All other stuff is ignored.
Send WINET_FRAME
{
DestAddr = 0xAABB
SrcAddr = 0xEFBE
Data = { AA BB CC DD 12 34 56 78 [PATTERN_2] }
}
( Delay = 100000 )
}
# Full if operator with both 'then' and 'else' clauses.
if( x > y )
{
# This block is parsed the usual way and all instructions
# are added to the current instruction block.
Send MY_WUSB_FRAME
Send MMC_FRAME( Delay = 2000 )
}
else
{
# This block is parsed in a special way.
# Only "{" "}" are taken into account.
# All other stuff is ignored.
Send MY_WUSB_FRAME
}
}
Vista de pagina 96
1 2 ... 92 93 94 95 96 97 98 99 100 101 102 ... 123 124

Comentarios a estos manuales

Sin comentarios