[Back to FAQ SWAG index]  [Back to Main SWAG index]  [Original]

TOPIC    :  Cool stuff Borland left out of their TP manuals. ;-)
FOR      :  TP 4.0+
This  post  is  about  cool  programming  concepts  that  will be
referred  to either  directly or  indirectly in  my ON PASCAL ...
tutorial series of messages.

The underlying  programming style that will  be implemented in my
posts  is  called  OBP,  Object  Based  Programming,  or  Modular
Programming. This programming style provides many of the benefits
of Object  Oriented Programming (OOP) without  actually having to
use OOP code in your programs.

These benefits are namely: 1)the  ability to manage complexity in
your programs, 2)easy to use reusable  object code in the form of
TPUs, and  3)fewer program bugs.  Further, you are  able to stick
with traditional programming methods with OBP.

The following  are definitions of cool  programming concepts. You
are  going to  have to  accept on  faith that  these are NOT just
boring definitions!!!  Every time you write  a program you should
be thinking about and using this  cool stuff. As Borland does not
talk about them in the context of OBP, I will. ;-)

So, ... It is time to rattle your brains a little.

It  is the  process by  which programmers  distill the  essential
characteristics of some conception that distinguishes it from all
others. Abstraction is why High Level Programming Languages (HLL)
were invented!  HLLs achieve abstraction  by allowing programmers
to write programs without having to bit-twiddle. Bit-twiddling is
for Assembly  Programming. Every HLL implements  abstraction to a
certain degree.  Hence, bit-twiddlers should  stay with ASM,  and
everybody  else should  start  thinking  in terms  of abstraction
rather than bit-twiddling in their programs!!! ;-)

A data type that  is defined in terms of  the operations that can
be  performed  on  objects  of  that  type  rather  than  by  the
properties   of  the   objects  themselves.   ADTs  represent  an
intermediate    step   between    traditional   programming   and
object-oriented programming.  Among the many  cool uses of  ADTs,
they can make  your code portable. Think of  ADTs as the ultimate
level of abstraction in high level programming.

The point in a program at which reference to a program's elements
or  abstractions   are  bound  to   specific  computer's  storage
locations and values.

A block  is a  segment of  source code  that can  be selected and
acted upon as a whole. Think  of blocks as being a relative level
of abstraction.

A data  conversion from  one type  to another.  They are  used to
selectively turn off type checking in TP.

A definition of a  set of data that specifies  the possible range
of values of the set, the operations that can be performed on the
values, and the way in which the values are stored in memory. The
concept of a data type  makes data manipulation more abstract and
hides the  underlying binary representation of  the data. We will
be using  Modules to implement  Data Types in  TP. Think of  data
types instead of just types as they are the total package!!!

Binding that occurs during program  execution. We will achieve to
a degree  this  type  of  binding  with  traditional  programming
methods using procedural types and pointers.

A variable  whose  value  can  be  accessed  and  modified by any
statement in  a program. These variables  exist during the entire
time  a  program  executes.  Conventional  wisdom  is that Global
variables are  to be avoided  as they can  easily result in  side

A design practise  in which implementation details  for both data
structures  and  algorithms  within  a  module  are  hidden  from
routines using  same. What is  hidden does not  contribute to the
essential  characteristics  of  the  abstraction.  In  theory, it
allows you to use modules in  a manner different from the planned
way without breaking  the routine that calls it.  In short units,
modules, and routines  are supposed to give out  information on a
need to know basis only, in order to avoid side effects.

A program variable whose scope in TP  is limited to a given block
of code  or routine. These  variables exist only  while the given
routine is executing. Conventional wisdom  is that you should use
Local rather than Global variables in your program.

An approach to software design in  which a program is broken down
into  small units,  or modules,  each of  which can be developed,
tested,  and finished  independently before  being combined  with
other modules.

A conceptual subset  of global variables.  They exist during  the
entire  length  of  program  execution  but  can  be accessed and
modified ONLY by  a block of code known as  a module. They are to
be considered good global. In TP, we will be implementing Modular
variables  with OBP.  You will  need  to  use these  since it  is
impractical to avoid all use of global variables.

--> Continued to next message

 * SLMR 2.1a * Great minds discuss ideas; Small ones discuss people!
 * Communications Systems BBS, Richmond, VA, (804)285-7231
 * PostLink(tm) v1.20  COMMSYS (#923) : RelayNet(tm)

{SWAG=???.SWG,JOHN GOHDE,On Pascal ... #0011 2:2}
--> Continued from previous message

A collection  of routines  and  data  structures that  performs a
particular task or implements a particular abstract data type. We
will  implement modules  in TP  as a  conceptual block of related

A precursor of  object-oriented programming in  which the program
is broken down into several independently compiled modules. It is
considered a refinement of  structured programming or traditional
programming  methods. OBP  recognizes the  strong role  that data
plays in programs.

A programming language designed to encourage programmers to write
modular and well structured  programs. With Pascal the programmer
is supposed to deal with  abstractions rather than always working
directly  with computer  memory.  Pascal  was designed  for those
programmers who  want the highest levels  of abstraction possible
in their programs.  Did you know that?  ;-)

An unanticipated  effect or change  of state caused  by a routine
that happens when  the program is executed. In  other words, they
are program "bugs".

Binding that  occurs during program compilation  or linkage. This
is the binding used with traditional programming methods.

A characteristic  of Pascal  that does  not allow  the program to
change the type of a variable during program execution.

A style   of   programming   designed   to   make  programs  more
comprehensible  and  programming  errors  less frequent. Strictly
speaking, SP concentrates on algorithms  or flow of control while
neglecting the role of data or objects.

Defines the nature of a variable. It is a level of abstraction.

The examination by  a compiler of the operations  in a program to
make sure that  the operations make sense, that  the correct data
types are being used, and  that all expressions are guaranteed to
be type-consistent.

This refers to the extent a given identifier can be referenced in
a program. Another way of looking at  this issue is how long does
an identifier in a program exist.

[Back to FAQ SWAG index]  [Back to Main SWAG index]  [Original]