submit urlsubmit rss feedadd directory

article

A comparison is an evaluation of similarities and differences - described by Gregory Bateson in his book Mind and Nature as the two quanta of experience.

In computer programming


In computer programming, when one compares the two values x and y, a negative number often indicates x < y, zero x == y and a positive number x > y. Even when two values are not integers, e.g. literal strings, this convention is largely adopted. For example, strcmp returns -1, 0, or 1 according to the lexicographical order, and qsort expects the comparison function to return values according to this convention. This is because it is efficient to do the subtraction x - y resulting in the directional signs above. In sorting algorithms, the efficiency of comparison code is critical since it is one of the major factors of sorting performance.

Sometimes, particularly in object-oriented programming, the comparison raises questions of datatypes and inheritance, equality and identity. It is often necessary to distinguish between:

  • two objects with different datatypes both related to another datatype, e.g. an orange and a lemon, both being citrus fruit
  • two different objects of the same type, e.g. two hands
  • two objects being equal but distinct, e.g. two $10 banknotes
  • two different references to the same object, e.g. two nicknames for the same person

More on [ Comparison ]


directory of related categories

 

 
directory of related topics

Comparison and Review :: Languages
Jovial :: Languages

 
directory of related sites

A Review of Non Ada to Ada Conversion - This report provides a discussion of the processes and problems involved with the conversion of software from early High Order Languages (HOL) to Ada.
Meta Description: [ This information provides you with details concerning a report for A Review of Non-Ada to Ada Conversions. ]

Ada 95 Demo Combines Java - Bytecode on the Web, AdaIC Newsletter Fall 1997.

Ada 95, Modula-3, CLOS - Brief comments on slide from computer science course with many languages.

C to Ada - Translating by Derek Jones.

C++ to Ada95 Translator - From Comp.compilers newsgroup.
Meta Description: [ From comp.compilers newsgroup: C++ to Ada95 Translator ]

C/C++ to Ada Help and Discussion. - C++ to Ada page.

High Performance Scientific Computing with Ada95 - In context of parallel computing, brief mention of Fortran90 and High Performance Fortran (HPF). Short document.

Intellectual Ammunition: C/C++ to Ada Help and Discussion - Tutorial for C and C++ programmers to show them what Ada can provide and how to set about turning the knowledge and experience they have gained in C/C++ into good Ada programming.

Resources on Ada and C++ - Resources on Ada, C++.

Secure Programming for Linux and Unix - C++, Java, Perl,Python, TCL, and Ada95.

SourceForge - Project Information - PyAda.
Meta Description: [ The world's largest development and download repository of Open Source code and applications ]

Translating C++ Software into Ada 95. - October 1995.

Translating Time Petri Net Structures into Ada95 Statements - The Petri Nets.
Meta Description: [ The Petri Nets Bibliography: Translating time Petri net structures into Ada-95 statements. ]

Advocacy_and_Comparisons related videos

 

HOMEADVERTISINGABOUT US

articlesartsbusinesscomputersgameshealthhospitalshomekids & teensnewsmobilephysiciansrecreationreferenceregionalscienceshoppingsocietysportsworld


Submit a Site About Become an Editor