3.1 Assignment Operator
Used to give value to a variable.
example:
x: = 1 + 2;
a: = a +1;
3.2 Arithmetic Operators
+
Used to do the sums.
example: a + b
-
Used to make cuts.
example: x - 1
*
Used to perform multiplication.
example: a * b
/
Used to make distributions.
example: 7/3
div
For integer division.
example:
10 div 5, will produce 2
10 div 3, will produce 3
mod
Used to calculate the remaining share.
example:
10 mod 5, will result in 0
10 mod 3, will produce 1
Thursday, May 24, 2012
Wednesday, March 21, 2012
2. Pascal statements
clrscr
Used to clean / clear the screen.
write / writeln
Used to display text or value of a variable on the screen.Difference between the write writeln is at the cursor position after the statement is executed. On write, the cursor will be behind the text, while the writeln, the cursor will be on the next line.
example:
write ('example');
writeln ('example');
writeln (a), (showing the contents of a variable)
write ('Hello', a);
read / readln
Used to read and enter a value that is inputted through the keyboard into a variable.
example:
readln (a), (insert the data inputted into the variable a)
readln; (waiting for the user presses the enter button before proceeding to the next statement)
Used to clean / clear the screen.
write / writeln
Used to display text or value of a variable on the screen.Difference between the write writeln is at the cursor position after the statement is executed. On write, the cursor will be behind the text, while the writeln, the cursor will be on the next line.
example:
write ('example');
writeln ('example');
writeln (a), (showing the contents of a variable)
write ('Hello', a);
read / readln
Used to read and enter a value that is inputted through the keyboard into a variable.
example:
readln (a), (insert the data inputted into the variable a)
readln; (waiting for the user presses the enter button before proceeding to the next statement)
Thursday, January 5, 2012
A. Program Structure
Here is a sample source code of a Pascal program:
sample program;
uses crt;
var
a: string;
begin
clrscr;
write ('Enter your name:');
readln (a);
writeln ('Hello', a);
readln;
end.
program
Contains the name / title of the program, in this case the 'example'.
uses
Contains a list of units to be used in the program, namely 'crt'. Unit is a separate program module and used to store related processes/function. As in the example, 'uses crt' means the program uses a unit called 'crt', which contains a collection of routines (procedures and functions) to control PC. If the program uses more than one unit, then each unit separated by commas (example: uses crt, dos ;).
var (declaration)
Contains a list of variables to be used in the program (in this example is 'a') and its data type (string), or can be called with the variable declaration. In addition to the variables, other declarations needed a program include:
Examples of constant and variable declarations:
const
n = 100;
var
a: integer;
begin-end
Contains statements that will run the program. Examples of statements are clrscr, writeln, readln, etc.. These statements should be in the begin-end block.
sample program;
uses crt;
var
a: string;
begin
clrscr;
write ('Enter your name:');
readln (a);
writeln ('Hello', a);
readln;
end.
program
Contains the name / title of the program, in this case the 'example'.
uses
Contains a list of units to be used in the program, namely 'crt'. Unit is a separate program module and used to store related processes/function. As in the example, 'uses crt' means the program uses a unit called 'crt', which contains a collection of routines (procedures and functions) to control PC. If the program uses more than one unit, then each unit separated by commas (example: uses crt, dos ;).
var (declaration)
Contains a list of variables to be used in the program (in this example is 'a') and its data type (string), or can be called with the variable declaration. In addition to the variables, other declarations needed a program include:
- Declaration of data types
- Declaration of constants
- Variable declaration
- Declaration procedure
- Function declaration
- Label declaration
Examples of constant and variable declarations:
const
n = 100;
var
a: integer;
begin-end
Contains statements that will run the program. Examples of statements are clrscr, writeln, readln, etc.. These statements should be in the begin-end block.
Friday, November 11, 2011
IT Research
- Pure IT Research: The research of this type is a study that attempted solve problems that arise related to IT field by looking for solutions which are fundamental. Generally, this research involved studying many existing theories in order to develop fundamental theories of other related. Some research that can be included within the scope of this include the development.
- IT Applied Research: Applied research in the field of IT is more based on research that utilizes the theory or method, which has developed another person within the scope of pure research IT, in the development of advanced research.
- Research System Development: The system is referred to here refer to systems that can be used directly by the user such as information systems and network systems. Research of this type generally try to apply various theories or methods have been developed both within the scope of pure research and applied research, such as database systems, programming languages, concepts and other tissues.
Compared
with pure and applied research in IT, this type of research now seems still
more attractive to students of TI Indonesia in the process of resolving their
learning activities. Research of this type also has clear procedures for its
implementation, because the general system development methodologies have been
proposed in the pure research stage.
- Research Related to the Use and Management of IT: In recent years, with the development of the application of IT in society, knowledge about the effectiveness of the use and knowledge in the field of IT management is also growing. Research related to science-science is too much done. Although still within the scope of IT, research of this type may be more associated with the field of social research, because that becomes the object of research is typically the user / users of IT, IT administrator or IT provider. So the possibility to apply the research methodology as well as research in the social field is very large.
Maybe there is still debating
whether the system development activities, including as a research activity or
not. When viewed from the definition of the word study (research) it, namely:
essentially research activities have
a goal to discover, interpret or revise
the existing knowledge in society. Thus, research involving the development
of the system, because it does not include the element to find, interpret or
revise the knowledge society, it still could be a matter of debate whether
these activities can be incorporated into the research activities in IT or not.
Following the development of higher education IT Indonesia and referring that, systems development is still in great demand by IT students in Indonesia as a thesis, I am personally of the opinion that the development of a system that performed in the order of lectures are included in the construction project (assignment) of a lecture, which may only be used as a final project (project end) of the students with a level below the S1 (D1, D2, and D3).
Following the development of higher education IT Indonesia and referring that, systems development is still in great demand by IT students in Indonesia as a thesis, I am personally of the opinion that the development of a system that performed in the order of lectures are included in the construction project (assignment) of a lecture, which may only be used as a final project (project end) of the students with a level below the S1 (D1, D2, and D3).
Tuesday, July 5, 2011
Computer
Origins, processing information almost exclusively related to arithmetical problems, but modern computers are used for many tasks unrelated to mathematics.
In such a definition have a tool like a slide rule, mechanical calculator types ranging from abacus and so on, until all contemporary electronic computers. The term better suited to a broad sense such as "computer" is "that process information" or "information processing systems."
Not with standing the foregoing, the above definition includes many special tools that could only take one or several functions.
When considering modern computers, their most important characteristics that distinguish them from the earlier count tool is that, with proper programming, all computers can emulate any nature (although perhaps limited by storage capacity and speed are different), and, indeed believed that the machine can now mimic the computing tools that we create in the future (although undoubtedly slower). In a sense, the limit of this ability is a useful test because the computer recognizes the "general intent" of the special purpose tool is earlier. The definition of "public purpose" can be formulated into a condition that a machine should be able to emulate a universal Turing machine. The machine that got this definition is known as a Turing-complete, and that they first appeared in 1940 in the middle of development throughout the world.
In such a definition have a tool like a slide rule, mechanical calculator types ranging from abacus and so on, until all contemporary electronic computers. The term better suited to a broad sense such as "computer" is "that process information" or "information processing systems."
Not with standing the foregoing, the above definition includes many special tools that could only take one or several functions.
When considering modern computers, their most important characteristics that distinguish them from the earlier count tool is that, with proper programming, all computers can emulate any nature (although perhaps limited by storage capacity and speed are different), and, indeed believed that the machine can now mimic the computing tools that we create in the future (although undoubtedly slower). In a sense, the limit of this ability is a useful test because the computer recognizes the "general intent" of the special purpose tool is earlier. The definition of "public purpose" can be formulated into a condition that a machine should be able to emulate a universal Turing machine. The machine that got this definition is known as a Turing-complete, and that they first appeared in 1940 in the middle of development throughout the world.
Subscribe to:
Posts (Atom)