B4R Tutorial Data types

Discussion in 'B4R Tutorials' started by Erel, Apr 11, 2016.

  1. Erel

    Erel Administrator Staff Member Licensed User

    The following data types are available in B4R:

    Numeric types:

    Byte: 0 - 255
    Int (2 bytes): -32768 - 32768. Similar to Short type in other B4X tools.
    UInt (2 bytes): 0 - 65535.
    Long (4 bytes): -2,147,483,648 - 2,147,483,647. Similar to Int type in other B4X tools.
    ULong (4 bytes): 0 - 4,294,967,295
    Double (4 bytes): 4 bytes floating point. Similar to Float in other B4X tools.
    Float is the same as Double. Short is the same as Int.

    The above is true on all boards, including the Arduino Due.

    Other types:
    Boolean: True or False. Practically it is saved as a byte with the value of 1 or 0.
    String: Strings are made from an array of bytes that end with a null byte (byte with the value of 0).
    Object: Objects can hold other types of values.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice