short

Used in an int variable declaration to reduce the size of the integer to 16 bits -32,768 to 32,767. Note that this is the default size, if no other Type-Specifier is used.

Example

The following example defines an array of short integers named arr. Each successive element is set to the incremented value of the short integer i.

    #define ARRAY_SIZE 4
    short i, arr[ARRAY_SIZE];
    while (i < ARRAY_SIZE) {
        arr[i] = i;
        lr_output_message ("i=%d", i);
        i++;
    }
Example: Output:
Action.c(11): i=0
Action.c(11): i=1
Action.c(11): i=2
Action.c(11): i=3