Articles Posted in the " " Category

  • Boolean Operators

    Boolean Operators

    These can be used inside the condition of an if statement. && (logical and) True only if both operands are true, e.g. is true only if both inputs are high. || (logical or) True if either operand is true, e.g. is true if either x or y is greater than 0. ! (not) True if […]


  • if (conditional) and ==, !=, <, > (comparison operators)

    if (conditional) and ==, !=, <, > (comparison operators)

    if, which is used in conjunction with a comparison operator, tests whether a certain condition has been reached, such as an input being above a certain number. The format for an if test is: The program tests to see if someVariable is greater than 50. If it is, the program takes a particular action. Put […]


  • % (modulo)

    % (modulo)

    Description Calculates the remainder when one integer is divided by another. It is useful for keeping a variable within a particular range (e.g. the size of an array). Syntax result = dividend % divisor Parameters dividend: the number to be divided divisor: the number to divide by Returns the remainder Example Example Code Tip The […]


  • Addition, Subtraction, Multiplication, & Division

    Addition, Subtraction, Multiplication, & Division

    Description These operators return the sum, difference, product, or quotient (respectively) of the two operands. The operation is conducted using the data type of the operands, so, for example, 9 / 4 gives 2 since 9 and 4 are ints. This also means that the operation can overflow if the result is larger than that […]


  • = assignment operator (single equal sign)

    = assignment operator (single equal sign)

    Stores the value to the right of the equal sign in the variable to the left of the equal sign. The single equal sign in the C programming language is called the assignment operator. It has a different meaning than in algebra class where it indicated an equation or equality. The assignment operator tells the […]


  • Define

    Define

    #define is a useful C component that allows the programmer to give a name to a constant value before the program is compiled. Defined constants in 86Duino don’t take up any program memory space on the chip. The compiler will replace references to these constants with the defined value at compile time. This can have […]


  • Comments

    Comments

    Comments are lines in the program that are used to inform yourself or others about the way the program works. They are ignored by the compiler, and not exported to the processor, so they don’t take up any space in the memory. Comments only purpose are to help you understand (or remember) how your program […]


  • Comments

    Comments

    Comments are lines in the program that are used to inform yourself or others about the way the program works. They are ignored by the compiler, and not exported to the processor, so they don’t take up any space in the memory. Comments only purpose are to help you understand (or remember) how your program […]


  • {} Curly Braces

    {} Curly Braces

    Curly braces (also referred to as just “braces” or as “curly brackets”) are a major part of the C programming language. They are used in several different constructs, outlined below, and this can sometimes be confusing for beginners. An opening curly brace “{” must always be followed by a closing curly brace “}”. This is […]


  • ; semicolon

    ; semicolon

    Used to end a statement. Example int a = 13; Tip Forgetting to end a line in a semicolon will result in a compiler error. The error text may be obvious, and refer to a missing semicolon, or it may not. If an impenetrable or seemingly illogical compiler error comes up, one of the first […]