Arduino Programming Language: Word

Name

word

Description

Datatype 'word'occupies two byte (16 bit) and it stores an integer number between 0 to 65535 as an 'insigned int'.

Syntax

word var
word var = value

Parameters

  • var: variable name
  • value: any integer number between 0 to 65535

Usage

Application

Examples

word a; // It declares a variable 'a'

a = 6482; // It assigns to 'a' the value 6482

word b = 15937; // It declares a variable 'b' and it assigns the value 15937

word int c = a + b; //It declares a variable 'c' as the sum between other two integer variables


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc