Turbo Pascal
Unidad I
Palabras reservadas:
Para poder usar cualquier lenguaje, debemos conocer los códigos que representan las actividades a realizar. Turbo Pascal cuenta con su propio conjunto, los cuales llamaremos palabras reservadas.
Palabras reservadas de Pascal Estándar y Turbo Pascal:
ABSOLUTE
AND
ARRAY
ASM
ASSEMBLER
BEGIN
BOOLEAN
BYTE
CASE
CHAR
COMP
CONST
CONSTRUCTOR
DESTRUCTOR
DIV
DO
DOUBLE
DOWNTO
ELSE
END
EXPORT
EXPORTS
EXTENDED
EXTERNAL
FAR
FILE
FOR
FORWARD
FUNCTION
GOTO
IF
IMPLEMENTATION
IN
INDEX
INHERITED
INLINE
INTEGER
INTERFACE
INTERRUPT
LABEL
LIBRARY
LONGINT
MOD
NAME
NEAR
NIL
NOT
OBJECT
OF
OR
PACKED
POINTER
PRIVATE
PROCEDURE
PROGRAM
PUBLIC
REAL
RECORD
REPEAT
RESIDENT
SET
SHL
SHORTINT
SHR
SINGLE
STRING
THEN
TO
TYPE
UNIT
UNTIL
USES
VAR
VIRTUAL
WHILE
WITH
WORD
XOR
Ninguna de estas palabras reservadas puede ser usada como identificador, ya que cada una de ellas tiene predefinida una función.
Identificadores:
Son etiquetas que representan variables, constantes, procedimientos, tipos de datos, funciones. Existen dos tipos de identificadores, los predefinidos por Turbo Pascal y los que define el programador. Los identificadores son una secuencia de 1 a 127 caracteres, donde el primer carácter debe ser alfabético, y el resto no debe contener espacios en blanco y caracteres especiales como son: !, %, $, &...
Tipos de datos:
Existen diferentes tipos de datos, los cuales son utilizados para manipular la información:
Tipo
Descripción
Rango
Boolean
Valores
True o False
Byte
Números enteros
0 .. +255
Char
Caracteres ASCII
'$', '%', '¦', 'ß', '¢'
Comp
Números reales
-9.2E18 a 9.2E18
Double
Números reales
5.0E -324 a 1.7E +308
Extended
Números reales
1.9E -4851 a 1.1E +4932
Integer
Números enteros
-32768 .. +32767
Longint
Números enteros
-2147483648 .. +2147483647
Real
Números con decimales
2.9E -39 a 1.7E +38
Shortint
Números enteros
-128 .. + 127
Single
Números reales
1.5E -45 a 3.4E +38
String
Conjunto de caracteres
'La...
More Programming Languages
essays:
Lenguaje SQL
... Timestamp: tipo de dato que se genera en hexadecimal. Guarda el clock en el momento ... Devuelve el string con todos sus caracteres en mayúsculas. 16/05/00 Filtros. Filtros de datos de consulta ... n de datos. Exec consul_clie_fech(nombre del procedimiento) 50 20/06/00 Declaración de variables dentro de un ...
NPuzzle Problem In Java, Lisp & Prolog
... , that a particular integer be odd, that a character be ASCII, or that an array not be a string. In addition, Common Lisp allows the option of declaring the type of variables. These declarations may specify the type to be a ...
Turing Notes
... process is occurring Secondary symbols Focus on Implementation Stage: Declaring a variable: In order to remember pieces of inputs or outputs, we must store ... Turing does this by translating the strings into numbers by using ASCII code If Statements If statements are used when making a decision ...
Turing Exam Notes
... filenum,filename, putFile OutputOpen: filenum, filename, getArraysArray An array is a variable that holds an entire list of informationSelection Sort-The selection ... does this by translating the strings into numbers by using ASCII codeIf StatementsIf statements are used when making a decision in ...
Computer Languages
... of today's modern languages have been a result of one of these three languages, but are greatly improved. Both turbo pascal and basic are languages that are easy to understand and the syntax is very easy and straightforward. In Basic ...
Report on Fortran as a programming language. Kreitzberg, C & Shnediderman, B. (1982). FORTRAN Programming. New York: Harcourt.
... FORTRAN statement is the assignment statement used to compute arithmetic results and assign the results of the computation to a variable. Although the use of variables in FORTRAN is similar to that in algebraic notation, conceptual differences exist between a mathematical ...
A comprehensive look at the development of the computer programming language, focusing partially on C++.
... made physical motion the first programming language. In 1942, however, the US Government built the ENIAC. Although more precise and variable, the ENIAC still followed my of Babbage's principles; such as the required presetting of switches, and the total rewiring ...
The creation of Tic-Tac-Toe game using the C/C++ language, includes full code of the actual program
... same result but made the code more legible, and professional looking. * We believe that the program contains too many 'global' variables. Although this enables you to get away without using many functions it can, in large programs, be very difficult to ...