Campbell CR5000 Especificações Página 175

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 238
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 174
Section 8. Processing and Math Instructions
8-3
If bit in And bit in The result
expr1 is expr2 is is
000
010
100
111
And Operator Example
The example assigns a value to Msg that depends on the value of variables A,
B, and C, assuming that no variable is a Null. If A = 10, B = 8, and C = 6, both
expressions evaluate True. Because both expressions are True, the And
expression is also True.
Dim A, B, C, Msg 'Declare variables.
A = 10: B = 8: C = 6 'Assign values.
If A > B And B > C Then 'Evaluate expressions.
Msg = True
Else
Msg = False
End If
ASIN (Source)
The ASIN function returns the arc sin of a number.
Syntax
x = ASIN (source)
Remarks
Source can be any valid numeric expression that has a value between -1 and 1
inclusive.
The ASIN function takes the ratio of two sides of a right triangle and returns
the corresponding angle. The ratio is the length of the side opposite to the
angle divided by the length of the hypotenuse. The result is expressed in
radians and is in the range -π/2 to π/2 radians.
To convert degrees to radians, multiply degrees by π/180. To convert radians
to degrees, multiply radians by 180/π.
ASIN is the inverse trigonometric function of Sin, which takes an angle as its
argument and returns the length ratio of the side opposite the angle to the
hypotenuse.
ASIN Function Example
The example uses ASIN to calculate π. By definition, a full circle is 2π radians.
ASIN(1) is π/2 radians (90 degrees).
Public Pi 'Declare variables.
Pi = 2 * ASin( 1 ) 'Calculate Pi.
Vista de página 174
1 2 ... 170 171 172 173 174 175 176 177 178 179 180 ... 237 238

Comentários a estes Manuais

Sem comentários