Programming Language

(Meta Information)

  1. Data Types

  2. Code

Data Types

Classification

  • Core Data Types / Builtin Data Types

  • User Data Types / Abstract Data Types

Core Data Types

String

Array of Chars

Number

Small Integer

Integer

Long Integer

Float

Double

Long Float

Boolean

Boolean

Float

Complex storing structure

Refer: Decimal to IEEE 754 Floating Point Representation

Abstract Data Types

  • Array - Sequential Storage of same data type. Individual values accessed using Index

  • Tuple - like Array, values accessed using Index. Sequential Storage of different data type

  • Structure - like Tuple, but values are accessed using key i.e. Property Name instead of Index

  • Union - Defined same as Structure, but can store only a single value of all properties defined

  • Class - Same as Structure by memory initializing deferred and implicit and not explicit like Structure

  • Enum - Same as Char, where Code Table is defined by Developer

Code

  • Operators
  • Statements
  • Functions

Operators

  • Assignment : =, +=, -=, *=
  • Comparision: ==, !=, >, <, >=, <=
  • Logical: AND, OR, NOT
  • Maths: +, -, *, /, %
  • Bit: Bitwise AND/OR, ShiftRight, ShiftLeft
  • Unary: ++, --, NOT
  • Ternary: condition ? ifTrue : ifFalse

Statements

Conditional Statements

  • if
  • if Else
  • if ElseIf 
  • Switch
  • Match

Loops

  • for (finite number of iterations)
  • for (number of items in iterator/array)
  • while ( condition is true)
  • do while (once, and then while condition is true)

Functions

Components of Function

  1. Input Parameters
  2. Output value(s)
  3. Context of Execution

Types of Function

  • SubRoutines / Procedure - has no return values
  • Function - with single return value
  • Function - with multiple return values - return and out parameters
  • Function - with return values and ref values as parameters
  • Function - with Function as a parameter

Class

  • Class defines template of the Object to be created

  • Inheritance is basically extending templates, by basing new template (Class) on existing template (Class)

  • Class Combines Data and Function in one Unit.

  • The constructor of a Class - which is Function executes as Constructor

  • Functions of Class execute as Methods

  • Through reflection, we can execute Functions of a Class on another Object

 

Generics/ Templates

programming-language

By Madhavrao Pachupate

programming-language

Meta information about Programming Language

  • 47