National Instruments BridgeVIEW Bedienungsanleitung Seite 275

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 455
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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
Seitenansicht 274
1 2 ... 270 271 272 273 274 275 276 277 278 279 280 ... 454 455

Kommentare zu diesen Handbüchern

Keine Kommentare