Diferencia entre revisiones de «highByte()»

De ArduWiki
Saltar a: navegación, buscar
(Ejemplo)
(Vea también)
Línea 29: Línea 29:
 
* [[bitSet()]]
 
* [[bitSet()]]
 
* [[bitWrite()]]
 
* [[bitWrite()]]
 +
* [[bitshift left]] - (<nowiki><<</nowiki>)
 +
* [[bitshift right]] - (<nowiki>>></nowiki>)
 
* [[lowByte()]]
 
* [[lowByte()]]
 
* [[shiftIn()]]
 
* [[shiftIn()]]

Revisión del 22:16 4 may 2019

Descripción

Extrae el byte de orden superior o el segundo byte más bajo de un tipo de datos más grande.

Sintaxis

highByte(variable);

Parámetros

variable
variable a evaluar que deberá ser int, long, float, unsigned int o unsigned long

Retornos

Retorna byte mas significativo.

Advertencias

Nada.

Ejemplo

int n = 12345;
byte val1 = highByte(n);
byte val2 = lowByte(n);

Vea también

Referencias