.. _basicTypesDoc: .. index:: single: Basic Types =========== Basic Types =========== Stide has three basic types: * Integer_ * Real_ * String_ Basics types are implicitly declared. ---- .. index:: single: Basic Types; integer .. index:: single: integer .. _Integer: Integer ======= A number without a fractional component is treated as an integer. An integer is a :ref:`constant block ` without an identifier and an integer value assigned to it. It has a `constant integer` output port. :: # Integer representation constant INTEGER { value: INTEGER meta: none } :INTEGER: ``-?[0-9]+`` :Example: ``0``, ``1024``, ``-32768`` ---- .. index:: single: Basic Types; real .. index:: single: real .. _Real: Real ==== A number with a fractional component is treated as a real. A real is a :ref:`constant block ` without an identifier and a real value assigned to it. It has a `constant real` output port. :: ## Real representation constant REAL { value: REAL meta: none } :REAL: ``-?({ [0-9]+.[0-9]*} | {[0-9]*.[0-9]+ })`` :Example: ``.1, 1.1, 1., -.1, -1.1, -1.`` ---- .. index:: single: Basic Types; string .. index:: single: string .. _String: String ====== A sequence of characters enclosed in single or double quotation marks is treated as a string. A string is a :ref:`constant block ` without a identifier and has a string value assigned to it. It has a `constant string` output port. :: # String representation constant STRING { value: STRING meta: none } :STRING: :code:`{\'.+\'} | {\".+\"}` :Example: ``'A sting.', "A string."``