Sei sulla pagina 1di 2

Data Types

In computer science and computer programming, a data type or simply type is a classification identifying
one of various types of data, such as real, integer or Boolean, that determines the possible values for that
type; the operations that can be done on values of that type; the meaning of the data; and the way values
of that type can be stored.
Boolean Boolean expressions are expressions that result in the value of either TRUE or FALSE.
Floating Point - is a variable type that is used to store floating-point number values. A floating-point
number is one where the position of the decimal point can "float" rather than being in a fixed position
within a number. E.g. 1.23, 87.425, 9039454.2.
Integer - A numeric value, for example, 1 and 1234 are examples of integers.
Character / String - Sometimes abbreviated as char, a character is a single visual object used to
represent text, numbers, or symbols. For example, the letter "A" is a single character.
Alphanumeric - Description of content that is both letters and numbers. For example, "1a2b3c" is a short
string of alphanumeric characters.
Flowchart
A flowchart is a type of diagram that represents an algorithm, workflow or process, showing the steps as
boxes of various kinds, and their order by connecting them with arrows. This diagrammatic representation
illustrates a solution model to a given problem.


Oval = Terminator To Begin/ End (Start and Stop)

Arrow = Connector Line To Connect any two symbols

Rectangle = Process Initialization and computation


Rhombus/Diamond = Decision Conditionals Branching


Circle On-page Connector To have flowchart connectivity on the same page


Pentagon Off-Page Connector Connecting part of flowchart (which is in one page) to the remaining
part (which is the next page)


Parallelogram = Data Read and print data
5 Rules in Naming Convention
1. Make your variable names long and descriptive Visual Studio has IntelliSense, Eclipse has its own
code completion, and I'm sure whatever IDE you're using can finish your variable names off for you, too.
Using long names prevents the ambiguity of short or cryptic names.

2. Put units in your variable names
if you are writing an engineering application you are going to be using variables with units. Embed the unit
name in the variable, for example, distanceInMM.

3. If you are using Camel Case, don't capitalize commonly hyphened or combined words.
Let me explain.

Callback is normally spelt as one word. So, pretty please, don't call your variable callback.

4. Never, ever use the variable name temp. The only perfectly valid exception to this rule is when you're
writing a swap function.

5. Int i is perfectly valid in a small loop. I've met programmers, who would crucify me for saying this, but
when your loop is half a dozen lines of code long or less, int i is perfectly valid as a loop counter. It's so
widely used, it's almost expected.
Reserved Word
In a computer language, a reserved word (also known as a reserved identifier) is a word that cannot be
used as an identifier, such as the name of a variable, function, or label it is "reserved from use". This is
a syntactic definition, and a reserved word may have no meaning. A closely related and often conflated
notion is a keyword which is a word with special meaning; this is a semantic definition. By contrast, names
in a standard library but not built into the language are not considered reserved words or keywords. The
terms "reserved word" and "keyword" are often used interchangeably one may say that a reserved word
is "reserved for use as a keyword" and formal use varies from language to language; for this article we
distinguish as above.
In general reserved words and keywords need not coincide, but in most modern languages keywords are
subsets of reserved words, as this makes parsing easier, since keywords cannot be confused with
identifiers. In some languages, like C or Python, reserved words and keywords coincide, while in other
languages, like Java, all keywords are reserved words, but some reserved words are not keywords
these are "reserved for future use". In yet other languages, such as ALGOL, there are keywords but no
reserved words, with keywords being distinguished from identifiers by other means.

Potrebbero piacerti anche