Changes

Jump to navigation Jump to search
3,973 bytes added ,  00:27, July 24, 2020
Added Concepts
Line 106: Line 106:  
:Simula 67 was the first object-oriented language.
 
:Simula 67 was the first object-oriented language.
 
:[[C]] showed that operating systems and compilers could be written in a high-level language.
 
:[[C]] showed that operating systems and compilers could be written in a high-level language.
 +
 +
==Programming Concepts==
 +
Certain concepts and constructs are common to most, if not all, programming languages.  The exact syntax and semantics will vary from language to language, but the basic concepts remain the same.  All languages support reserved keywords which define the vocabulary of the language.  Identifiers are user-specified words that can be used to name variables, functions, constants, and more.
 +
 +
===Comments===
 +
Comments are a construct used in programming languages to support documentation.  Comments are ignored by the compiler/interpreter, and are solely for the use of humans reading the source code.
 +
 +
===Variables===
 +
Variables are named storage places in memory that can hold data.  The kind of data stored in variables depends upon the data type of the variable.  Naming conventions differ between them, but typically variable names start with an alpha character (A-Z or a-z), and can contain alphanumeric and underscore characters.
 +
 +
===Data Types===
 +
[[Data types]] indicate both how much data is stored as well as how that data can be processed and represented.  Some languages (such as PHP) are typeless, indicating that variables can store any type of data.  Other languages (such as C++) are strictly typed, indicating that each variable can only store data of a given type.
 +
 +
===Literals===
 +
Literals are values that are used within programs.  Examples include numeric literals such as 200 or 3.14159, and string literals such as 'Text' or "Cow".  Typically character and string literals are delimited with single quotes (') or double quotes ("), with some languages permitting both.
 +
 +
===Constants===
 +
Most languages support named literal values so that the use of constants in the code is self-documenting.
 +
 +
===Statements===
 +
Statements are instructions which indicate what action to perform.
 +
 +
====Flow control====
 +
Flow control statements include loop constructs, goto statements, function calls, switch/case statements, and others.  goto is provided in most languages, but its use is almost universally frowned upon, since it makes program maintenance more difficult.
 +
 +
====Assignment====
 +
Assignment statements allow the assignment of values to variables, and copying of data.
 +
 +
====I/O====
 +
I/O statements concern reading input from the user, or files, or devices, and writing output to them.
 +
 +
===Operators===
 +
Operators are reserved symbols used for various operations.  Unary operators operate on a single value.  Binary operators operate on two values.  Ternary operators operate on three values.  There are several different classes of operators typically available.
 +
 +
====Arithmetic====
 +
These operators before arithmetic operations such as add, subtract, divide, multiply, and so forth.
 +
 +
====String====
 +
String operators perform operations on strings, such as concatenating strings together.
 +
 +
====Logical====
 +
Logical operators operate on boolean values, including and, or, and not.
 +
 +
====Comparison====
 +
Comparison operators compare values and include such operations as equal-to, not-equal-to, less-than, greater-than, less-than-or-equal, and greater-than-or-equal.
 +
 +
====Bitwise====
 +
Bitwise operators are used to manipulate individual bits in integer values.
 +
 +
===Functions===
 +
Functions are identifiers that take zero, one, or several parameters and return a value based upon the parameters.  Functions can return the current system time, perform arithmetical operations, perform string operations, and so forth.
 +
 +
Most languages allow users to define their own functions.
 +
 +
===Objects===
 +
[[Object Oriented programming]] is supported in most modern programming languages.
 +
 +
===Pragmas/Directives===
 +
Pragmas (aka directives) provide a way of changing options associated with a compiler.  For instance, a pragma may alter the memory alignment of data.  Conditional compilation is also provided by directives that enable or disable the inclusion of code depending upon external conditions (such as the platform that the program is being compiled upon).
    
==Prescient Quotes on Police State Programming Surveillance==
 
==Prescient Quotes on Police State Programming Surveillance==
SkipCaptcha
292

edits

Navigation menu