Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Contents

C Language: ............................................................................................................................................. 1
C# Language: ........................................................................................................................................... 2
C++ Language: ......................................................................................................................................... 2
Java Language: ........................................................................................................................................ 3
JavaScript Language: ............................................................................................................................... 4
Python Language: .................................................................................................................................... 4
FORTRAN Language: ................................................................................................................................ 4
Ada Language: ......................................................................................................................................... 5
Perl Language: ......................................................................................................................................... 6
Pascal Language: ..................................................................................................................................... 6
MATLAB Language:.................................................................................................................................. 7
APL Language: ......................................................................................................................................... 7
VB Language:........................................................................................................................................... 7
PHP Language:......................................................................................................................................... 7
COBOL Language: .................................................................................................................................... 8
R Language: ............................................................................................................................................. 8

C Language:

- ANSI C Variable Name 31 Max Length


- Names Case Sensitive
- Local Variables are Stack Dynamic
- is Not strong typing because Of Union ( avoids type checking and points to the same
memory )
- String is Not Primitive, can be defined using an array of char
- String Length is Limited Dynamic, end of string has \0
- Has Enumeration Type
- Array Index Integer Only
- Doesn't specify range checking for Arrays

1
- Arrays Without Static are fixed stack-Dynamic subscript Binding
- Provide Fixed Heap-Dynamic
- The Union provided called Free Union
- Turnery Operator, var = ( check )? true_val : false_val
- Boolean expression && , || , !
- Doesn't have a Boolean type, instead uses int
- uses short-circuit evaluation for && , || and provide bitwise Boolean are not short
circuit & , |
- Assign using =
- Char evaluated into Int
- C's switch statement: 1- Can only be Integer or Char( since it's eval into an int )
2- any number of segments can be executed in one ( require Explicit break to stop ) 4-
default for unpresented values
- Iterative statement: for ([expr_1] ; [expr_2] ; [expr_3]){ }
- // old C versions cannot write int i = 1 in expr_1 , u have to define before loop
- // everything can be changed in loop
- // expr_1 evaluated once , other two every iteration
- Iterative statement: while-do ( pre test ) , do-while ( post-test )

C# Language:

- Offers Decimal Data type


- Supports Unicode in Characters
- Has Enumeration Type
- Specify Range Checking for Arrays
- ArrayList Provides Heap-Dynamic subscript binding
- Iterative statement control expression must be Boolean

C++ Language:

- Variable Name has no Limit on length


- Names Case Sensitive
- Dynamic Objects Life Time is Explicit Heap Dynamic
- is Not strong typing because Of Union ( avoids type checking and points to the same
memory )
- even with a static scope, can Access the hidden variables using classs_name::name
- String is Not Primitive, can be defined using an array of char

2
- String Length is Limited Dynamic
- Has Enumeration Type
- Doesn't specify range checking for Arrays
- Arrays Without Static are fixed stack-Dynamic subscript Binding
- Provide Fixed Heap-Dynamic
- The Union provided called Free Union
- Turnery Operator, var = ( check )? true_val : false_val
- Allow User-defined overloaded Operators
- Type Casting float(sum) also (float) sum
- uses short-circuit evaluation for && , || and provide bitwise Boolean are not short
circuit & , |
- Assign using =
- Iterative statements differ from C in 1- control expression can be Boolean 2- initial exp
can include var definition
- Iterative statement: while-do ( pre-test ) , do-while ( post-test )
- in Defining a function, default parameters must be last because it's associated with the
position

Java Language:

- Variable Name has no Limit on length


- Names Case Sensitive
- Local Variables are Stack Dynamic
- Objects Life Time are Explicit Heap Dynamic
- Uses Unicode in Characters
- String is Primitive
- String Length is Static
- Array Index Integer Types
- Specify Range Checking for Arrays
- Ternary Operator, var = ( check )? true_val : false_val
- uses short-circuit evaluation for && , || and provide bitwise boolean are not short
circuit & , |
- Assign using =
- Iterative statements control expression must be boolean
- has while-do, do-while same as C, except control expression must be boolean, there is
no goto

3
JavaScript Language:

- Variable Dynamic Type Binding


- all Variable Life Time are implicit Heap Dynamic
- Supports Unicode in Characters
- String Length is Dynamic
- Provides Heap-Dynamic subscript binding
- has === , !== to prevent coercion
- Assign using =

Python Language:

- To Avoid Greedy Matching add ? after the * or + ' +? ' or to get between (.*?)
- Turnary Operator , x = true if condition else fale
- Integer division use // to avoid loss
- Has List Comprehension , S = [ x ** 2 for x in range(10) ] it might have redundant
elements , so we can use { } instead
- Allow calling a function with keyword parameter or positional or key and position //
when u start a key u have to continue by key

FORTRAN Language:

- Fortran 1 Variable Name 6 Max Length


- Fortran 9 Variable Name 31 Max Length
- Variable Implicit Declaration
- Fortran 77 all Variables lifetime are static
- Fortran 77 is not strong typing Because Of EQUIVALENCE ( 2 variables point to the
same memory )
- Uses ( ) for Array
- Array Index Integer Only
- Doesn't specify range checking for Arrays
- Fortran 95 Array slice , ( 3 , 6 ) returns 3 4 5 6
- The Union provided called Free Union

4
- ** is Right Associative
- Fortran 90 Boolean Expression and, or, not
- Fortran 77 Boolean Expression .AND. , .OR. , .NOT.
- Assign using =
- Early Multiple-way selection: IF (arithmetic expression) N1, N2, N3 // which N1 for
Negative, N2 0, N3 Positive // it's similar to MIPS
- Fortran 90 Iterative : DO label var = start, finish [, stepsize]
- Iterative Design choice: 1- loop var must be Int 2- Loop var has the last value 3- loop
var can't be changed in the loop, parameters can 4- parameters evaluated once
- Fortran 95 Iterative: [name:] DO variable = initial, terminal
▪ [,stepsize]
▪ END DO [name]
- Fortran 95 Allow calling a function with keyword parameter or positional or key and
position // when u start a key u have to continue by key

Ada Language:

- Variable Name has no Limit on length


- is Not Strong Typing because of UNCHECKED CONVERSION ( bit by bit copy )
- even with a static scope, can Access the hidden variables using unit.name
- Has nested Functions
- Supports three String Length Options
- Has subrange Type called subtype
- has enum called type
- Uses ( ) for Array
- Array Index Integer or Enum
- Arrays subscript binding stack dynamic
- ** is non-associative, must use ( )
- Allow User-defined overloaded Operators
- No coercion
- Type Casting Float(sum)
- Boolean Expression and, or, not, xor
- Can specify Short-circuit evaluation using ( and then ) or ( or else )
- Assign using :=
- Case statement : case ____ is
• when __ => statement_sequence;
• when others =>

5
▪ end case
▪ // it has implicit break
- Iterative statement: for var in [reverse] discrete_range loop
▪ end loop
• // discrete_range is sub_range of int or enum
• // loop var undeclared after loop finish
- Iterative statement only pre-test
- Allow calling a function with keyword parameter or positional or key and position //
when u start a key u have to continue by key
- in Defining a function, default parameters must be last because it's associated with the
position

Perl Language:

- Variable Implicit Declaration ( Type Binding )


- Prefix - $ Scalar , @ array , % associative array
- String and Arrays Life Time are Implicit Heap Dynamic
- String Length is Dynamic
- Doesn't specify range checking for Arrays
- Provides Heap-Dynamic subscript binding
- Record Structures are indicated in the Orthogonal Way
- The Union provided called Discriminant which has Type checking
- Gives ' - ' Unary operator higher Precedence than %
- has two iterative statements pre-test, while and until, but no post-test logical loop
- in Perl enters the loop when the condition is FALSE

Pascal Language:

- Pascal is not strong typing because of variant type ( type of value stored in variant
determined at runtime )
- Has nested Functions

6
- Array Index Any Ordinal Type
- Integer division use div to avoid loss
- No coercion
- Assign using :=
- Int can be assigned to Real but not the opposite
- Iterative statement: for var := initial (to|downto) final do
- Iterative design Choices: 1- loop var any ordinal 2- loop var undefined after finishing 3-
loop var can't be changed in a loop, parameters can 4- parameters evaluated once
- Iterative statements has two separate statements: 1- while-do ( pre-test) 2- repeat-until
( post-test )

MATLAB Language:

- ^ is Left Associative

APL Language:

- all Variable Life Time are implicit Heap Dynamic


- all operators have equal precedence and read right to left

VB Language:
- Variable Implicit Declaration ( Type Binding )
- PostFix - $ String , % integer , ~% unsigned Integer , or don't use any
- Assign using =
- ^ is Left to Right unlike other Languages

PHP Language:
- Variable Dynamic Type Binding
- Has nested Functions
- Has Associative Arrays, starts with $
- has === , !== to prevent coercion

7
COBOL Language:
- Variable Name 30 Max Length
- Offers Decimal Data type
- String Length is Static
- Record Type uses Level Numbers
- to reference a record can be done Elliptical way as long it's unambiguous

R Language:
- has apply() function which used to manipulate slices of matix , array to avoid loops
- X <- c(1,2,3,5,3,5); dim(X) <- c(2,3)
- dim(X)
- # Sum the values of each column with `apply()`
- apply(X, 1, sum) // 1 is by row
- apply(X, 2, sum) // 2 is by col
- apply(X, 1, mean)
- apply(X, 2, sd)
- apply(X, 2, max)
- apply(X, 2, median)
- apply(X , 2, function (x) length(x)-1)
- apply(X , 2, function (x) max(x)+min(x))
- apply(X , 2, function (x) max(x)/2+min(x)*3)

You might also like