National Instruments BridgeVIEW Manual de usuario Pagina 275

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 455
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 274
Chapter 12 Case and Sequence Structures and the Formula Node
BridgeVIEW User Manual 12-12 © National Instruments Corporation
The following example shows how you can perform a conditional
assignment inside a Formula Node.
Consider a code fragment that computes the square root of
x
if
x
is positive,
and assigns the result to
y
. If
x
is negative, the code assigns –99 to
y
.
if (x >= 0) then
y = sqrt(x)
else
y = -99
end if
You can implement the code fragment using a Formula Node, as shown in
the following illustration.
Conditional
Operator
False
Condition
Condition
Tr ue
Condition
Vista de pagina 274
1 2 ... 270 271 272 273 274 275 276 277 278 279 280 ... 454 455

Comentarios a estos manuales

Sin comentarios