0% found this document useful (0 votes)
32 views62 pages

Computerised Accounting

Uploaded by

aamirsafwan786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views62 pages

Computerised Accounting

Uploaded by

aamirsafwan786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

Computerised/ Accotmtma

(A)
INTRODUCTION

"When accounts are written with the help of computers, it is called


computerised accounting or mechanised accounting"

"Computerised accounting system implies, carrying out most of the


accounting work i.e. recording, classifying, summarising and interpreting
the accounting information by the help of computer.

Today the most commonly used word in this country is computer.


We cannot think of a day without a mention of computers in our day
today industrial and commercial life.

While discussing computerised accounting system in detail, it is


felt necessary to mention few details about the background of innovations
of computer modem functioning part of computer, the machine, its
important features and main areas of applications.

Computer:

A computer is an electronic device capable of accepting data and


instructions, processing of data according to the given instructions and
communicating the result of the said data processed. In other words, a
computer is an electronic data processing machine, which helps us to
solve the problems with speed and accuracy. It not only calculates and
ComputerizedRecounting

makes comparison but also stores information. Computers solve


problems belonging to industry, business, education, science, law, social
science and even accounts.

Computers are information-processing machines, which can do a


variety of jobs very quickly. Computer can access and process data
millions of times faster than human being.

1. According to USASI, "Computer means a device capable of


solving problems by accepting data, performing described
operations on the data and supplying the result of these operations".

2. The computer can be defined as an electronic machine for the


automatic processing of data in a predetermined manner. Data
means facts and figures and processed data are known as
information.

A computer has different meaning to different classes of people.


To an electrical engineer, it is a system of circuits, body and transistors,
while to a mathematician it is a machine for the solution of problems in a
reasonable time. For a layman, computer is a black box, which is able to
perform every task whatever they want, by just pushing a button. If they
will not get the desired result, then they start thinking, it is nothing more
than a "Lohe Ka Dabba" computer is not a black box, it is a machine,
created, operated and managed by men. It has no brain of its own. The
power of a computer entirely depends on the human design of the system,
in which it is to perform and the human instructions, it is to obey. That is
why; computers are sometimes called GIGO machines, i.e. Garbage in
Garbage out.1

1 Siddiqui, S.A. Comprehensive Accountancy, Laxmi Publications, New Delhi, 1995, page no. 351.

35
ComputerizedRecounting

Origin of Computers:

Ancient people used fingers, pebbles and stone for enumeration.


The history of computers dates back 3000 B.C., when China discovered
equipment known as ABACUS for systematising mathematical
calculations. After that there were many improvements but there was no
noteworthy improvement upto 19th century. In the first decade of 19th
century Jacquard invented a loom, which was controlled by Punch cards.
The present computer system is based upon these punch cards. In 1822
Babbage invented difference engine, which was used for developing
Happier Table or Logarithm table. This table is very useful for
mathematical calculation. Charles Babbage is known as the father of
computers. He invented a tabulating machine in 1822, which was to
work with a stored sequence of instructions of programme. It contained
two features, which are basic to modem digital computers. The facility of
changing the instruction sequence as a result of the comparison of two
quantities and the facility to modify its own stored programme. From
1940 onwards, machines started on electricity, and the modem computer-
came into existence. In India the first commercial computer appeared in
60's, a real boom in computers is of recent origin.

Features of Computer:

Computer is an electronic device which stores and processes


information to give meaningful results. Growing popularity of computers
in the present day society is the result of following features of a
computer.

36
ComputerizedRecounting

1. Speed:

A basic feature of a computer is the high speed with which it can


perform all arithmetical and logical operations. Computers are very fast
in performing operations. A present day computer can perform a million
additions per second, with technological advancement; speed with which
operations are performed by computers has increased.

2. Storage:

Memory unit of a computer is capable of storing large volume of


information, which is beyond the capacity of a human brain. Stored
information can be recalled at any time. The internal memory (RAM and
ROM) of the central processing unit is very large but is limited.
However, this can be supplemented by external memory and information
can be stored on magnetic tapes, floppies etc. Information stored on
floppies, tapes etc. can be used by putting floppy into the computer.

3. Accuracy:

Another very important feature of a computer is the high degree of


accuracy, with which it performs various operations. Unlike human
beings, computers can work continuously with same level of efficiency
and without any sign of tiredness. Popularity of computers is due to
error-free operations performed by the computer. Computers execute a
program and processes data with precision and high degree of reliability.
But it must be remembered that if data and program fed into the computer
are wrong, it will either give no results or wrong results. Thus, if correct
information and instructions are fed into the computer, it gives 100%
accurate results. Therefore, it is said that a very special feature of a
computer is "Garbage in, Garbage out". (GIGO).

37
ComputerizedAccounting

4. Automation:

A computer is a data processor that can perform substantial


computations including numerous arithmetic and logic operation, without
intervention by a human operator during the run" (International Standard
Organisation). Thus, once the program and the data are fed into computer
memory, it executes these instructions automatically, i.e. without any
human intervention.

5. Diligence:

Computer, being an automatic machine, can perform continuously


with same level of efficiency and precision. Unlike human beings there
are no sign of tiredness, fatigue etc. in computers. They do not get tired
or bored by monotonous, lengthy or repetitive type of work.

6. Versatility:

Unlike a human being, a computer is capable of doing a wide


variety of jobs and can shifts from one job to another according to
instructions fed into it. A computer can be used for accounting work,
scientific work, industrial work, reservation work, playing chess and
cards etc.

38
ComputerizedRecounting

Basic structure of computer

1. Input Device:

Input device is a device through which data and program is fed into
the computer.

Input Unit:

The work of input unit is to convert our every day language into "
binary patterns for the machine and transfer it to the memory. The input
devices are used to convert information to data for transitions to the
computer's processing unit. A wide variety of computer input devices
have been developed, these are:

(1) Computer keyboard


(2) Visual Display unit
(3) Punched cards
(4) Paper tapes
(5) Magnetic tapes
(6) Discs

39
ComputerizedRecounting

(A) Floppy discs


(B) Mini floppies
(C) Micro floppies
(D) Standard floppies
(7) Magnetic ink character reader
(8) Optical mark-reader
(9) Writing Pad device
(10) Bar Code Reader
(11) Voice Recognition System

2. Central Processing Unit (CPU) :


The central processing unit is the nerve centre of the computer.
Thus, it is the mind and heart combined with the central nervous system
of a computer.

Central processing unit (CPU) processes the data given by an input


device as per program. A program or software is a set of instructions to a
computer to perform certain operations in a sequence to get the desired
results. This software are either operating software which are used to run
the computer system and allow to communicate with other parts or
application software which perform specific tasks required by the user. It
is capable of performing arithmetical and logical operations. The CPU
consists of the following:

(a) Memory Unit:

It is a storage unit. It stores the data and program (a set of


instructions to perform certain operations) fed by the input devices,
intermediate results during processing of information and final output or
results of processing. The memory of a computer can be basically
classified into two parts:

40
ComputerizedAccounting

(i) Random Access Memory (RAM): It is capable of storing


information temporarily and the stored information is erased when
power supply is cut off. It is also called volatile memory.

(ii) Read Only Memory (ROM): This part of memory stores


information permanently and is not erased when the power supply
is cut off. It is also called non-volatile memory.

Both RAM and ROM are parts of the internal memory of a


computer. This can be supplemented by external memory and
information can be stored permanently on magnetic tapes, floppies etc.
and recalled at any time by putting these tapes, floppies into the
computer.

(b) Control Unit:

Control unit (CU) is the most important part of the central


processing unit. It is the brain or decision-making part of the computer.
It gets information processed in accordance with instruction fed into the
computer. Computer functions are according to instructions given to it or
by feeding a program through input device. It is not capable of
performing anything by itself. Control unit gets the program executed by
fully controlling, not only the memory unit and ALU, but also input
device and output device. Thus, control unit interacts with all other units.

(c) Arithmetical Logical Unit:

Arithmetical logical unit (ALU) performs all arithmetical


operations and logical operations. On getting instructions from the
control unit it processes data taken from the memory unit and processed
information is transferred back to memory unit.

41
ComputerizedAccounting

3. Output Device:

The device through which information fed into the computer and
the processed information is obtained by the user is called an output
device. On getting instructions from the control unit raw and processed
information drawn from the memory unit is displayed by the output
device. Computer is capable of solving problems by accepting
instructions and data through input device, performing operations on the
data in the central processing unit as per instructions fed into the
computer and supplying the results of these operation along with data and
instructions through output device.

Most commonly used output devices are:

1) Computer graphics
a) Block based images
b) Pixel based images
c) High resolution graphics
d) Mouse /mice
2) Magnetic Tape unit
3) Printers
a) Character printers
b) Line printers
c) Page printers
d) Dot matrix impact character printers
e) Daisy wheel printer
f) Thermal printers
g) Chain printers
h) Dand printers
i) Laser printers

42
ComputerizedAccounting

4) Graph plotters
a) Flat bed type
b) Drum type
5) Digital plotters
6) Incremental plotters
7) Micro film
8) Speech output

Hardware:

The physical equipments such as machine itself along with input


and output devices are called hardware.

Software:

Software is set of programs, documents, procedures, routines and


functions associated with the operation of a computer system. Software
is an essential complement to the computer hardware. The hardware
alone cannot perform any calculation or manipulation. It needs exact
instructions about what to do and in what order to do it. Software
describes the 'soft' portion of the computer system, that is the computer
programs, which when executed operate the hardware.

Software can be broadly classified as - System Softwares,


Langauges and Application Softwares.

System Software:

Consists of all the programs, languages, and documentation


supplied by the manufacturer with the computer. These programs are
used to communicate with the different units of the computer. These
make the machine easier to use and allow very efficient use of the

43
ComputerizedAccounting

resources of the hardware. In other words a system software is a


collection of programs designed to operate, control and extend the
processing capabilities of the computer itself.

Operating System

An operating system (OS) is an integrated collection of programs,


which takes control over the operation of the computer to the extent of
being able to allow a number of programs to be run on the computer
without human intervention. In other words, OS can be treated as a
Traffic-Police Man, who controls the movement of traffic at a inter­
section on the road and who also keeps unwanted vehicles or vehicles
which are not in perfect condition, off the roads.

Compilers & Interpreters

Human communicate with each other through languages such as


English, Hindi, German etc. Computers have their own languages to
communicate with. These languages have their own syntax. Unless a
programmer adheres exactly to the syntax (grammer) of a programming
language, the computer will not be in a position to execute the
instructions. Computer languages can be classified as Low Languages
and High-level languages.

Low Level Language (LLL)

Low Level Language (LLL) can be divided under two heads viz.,
Machine level language & Assembly level languages. Machine language
is at the binary level,, that is, it consists of patterns of binary digits. The
only type of code which the computer itself can understand is machine
code. The set of instructions, codes, created in conjunction with the
computer designer, is called a machine language. Assembly Language or

44
ComputerizedAccounting

Assembler has been developed with an idea of mnemonics (memory


aids). It would be easy for us to remember certain abbreviated words
instead of series of digits. Say for example, a machine code 10001
(binary) may stand for 'multiply' operations. A programmer can
remember it using mnemonic MULT. But this step of simplification for
the programmer, make things more involved for the computer. The
mnemonics have to be translated into binary pattern before the machine
can understand the operations needed. This act of translation is carried
out by a special pre-stored program called Assembly language or
Assembler.

High Level Language (HLL)

This is a language in which instructions are given to a computer


using certain English words and conventional mathematical notations.
While writing a program in a HLL, there is no need for mnemonics or
any conversion of the instructions into machine code. By using HLL a
programmer saves himself a great deal of time and effort as that
compared'to LLL. However, a computer cannot directly understand
HLL. These languages use a more complicated pre-stored program
known as Compiler to translate the programmer's instruction (i.e. the
source program) into its machine level equivalent (i.e. the Object
Program), which a particular machine has been instructed to understand
and function accordingly. The High Level language used is largely
determined by two factors viz., the application in hand and the choice
offered by the computer installation. BASIC, COBOL, C, PASCAL and
FORTRAN are the most popular high-level languages.

45
ComputerizedAccounting

A compiler translates a program (written in HLL) into a machine


language program. For each HLL the machine requires a separate
complier to create a unique object program. Once a source program is
compiled there is no further need of that source program because the
output can be obtained by executing only the object program.

HLL programs may also be translated into a sequence of machine


instructions. Like compilers, interpreters are also unique for HLLs.
Basically the functions of compilers and interpreters are same; the only
difference is that a compiler provides a separate object program but the
interpreter does not. If an interpreter is used, then each and every time
the source program will be needed. Another difference is that interpreter
translates programmer's instructions (the source program) line-wise i.e. it
will not execute the next line unless the previous one is error-free.

A HLL can be grouped into three broad application areas as follows :

APPLICATION COMPILERS/TRANSLATORS/
INTERPRETERS

SCIENTIFIC FORTRAN (FORmula TRANsiator)

BUSINESS COBOL (Common Business Oriented


Language)

GENERAL/BUSINESS PASCAL, C, VISUAL BASIC

GENERAL BASIC (Beginners All -purpose Symbolic


Instruction Code)

Utilities and Application Development Softwares:

Apart from the Compiler / Translator, Interpreter and popular


programming languages, there are many powerful utilities and application

46
ComputerizedAccounting

development softwares which do not require significant programming


knowledge. The application development software are used to develop
commercial application program for a specific purpose. The most
important category of these utilities, which enables a user to effectively
utilise a computer are :

* Data Base Management Software e.g. dBASE, FOXPRO &


Clipper etc.

* Spreadsheet e.g. LOTUS & QUATROPRO & MS-EXCEL etc.

* Word Processing e.g. Word Star, MS Word, MS Write & Word


Perfect etc.

* CADD/Graphics Software e.g. AUTOCAD, PAINTBRUSH,


LOTUS, HG, 3-D Studoo & CORELDRAW etc.

* Data Communication Software D-link, LAN, WAN, E-mail

* Diagnostic Utilities e.g. PCTOOLS, NDD & Anti-Virus Utilities


etc.

Application Software:

Application softwares are the program used to perform some


specific functions, e.g. a program for Inventory Control, Payroll, and
Financial Accounting etc.

Firmware:

This is a sequence of elementary instructions that are translated by


a micrologic subsystem residing in the CPU. Firmware is also known as
micro-programs. The programs held in ROM are the example of
Firmware. These are stored permanently in the ROM and are ready for
use when the computer is switched on.

47
ComputerizedAccounting

Classification of Computer:

Computer may be classified as under:

(I) On the basis data they are designed to process

(a) Analog Computers (b) Digital Computers

(c) Hybrid Computers

(a) Analog Computers:

Analog computer is a device that operates on data in the form of


continuously variable physical quantities. These do not compute directly
with numbers, they deal with the variables. Data which is obtained
through measurement along a continuous scale is called continuous data
e.g. speed of an automobile is measured by a speedometer. Analog
computers operate by measuring and are mainly built to solve one
specific problem.

(b) Digital Computers:

A digital computers is a device that manipulates discrete data and


performs arithmetic and logic operations on these data. Digital
computers operate essentially by counting. Data which are obtained by
counting are called discrete data, e.g. the total number of students in a
classroom. They are used in scientific and engineering applications.
Digital computers are better known as general purpose computers. An
electronic digital computer is a general purpose machine, so the same
computer can produce invoices, solve differential equations, prepare
payroll or translate languages.

48
ComputerizedRecounting

(c) Hybrid Computers:

A hybrid computer is a data processing devices which uses the


desirable features of both analog and digital computers or we can say that
hybrid computers are the combination of analog computer and digital
computer.

II. On the basis of Purpose:

(a) Special purpose computer (b) General purpose computer

(a) Special purpose computer:

A special purpose computer is one that is designed to perform only


some specific task. The program or instructions is wired into or
permanently stored in such a machine. Although this lacks versatility, it
does a single task quickly and efficiently, e.g. a special purpose processor
designed to solve complex navigational problems.

(b) General purpose computer:

A general-purpose computer is one that can store different


programs and can thus be used in countless applications. The versatility
of a general purpose computer is limited only by human imaginations.

III. On the basis of Size and functioning:

(a) Micro Computer (b) Mini Computer

(c) Main Frame Computer (d) Super Computer

(a) Micro Computer:

A microcomputer is the smallest category of computer consisting


of a microprocessor and associated storage and input/output elements.
These are designed to be used by one person at a time, that is they are

49
ComputerizedRecounting

single user oriented. Personal computer (PC) is a microcomputer


designed for general-purpose computations. It can perform various tasks.

(b) Mini Computer:

A mini computer is a relatively fast but small and inexpensive


computer with somewhat limited input/output capabilities. Mini
computer systems are usually designed to handle the processing needs of
multiple users simultaneously. Mini computers provide the facility of
more storage capacity and communication link between users. The first
mini computer was developed by DEC (Digital Equipment Corporation),
the largest producers of MINIs. In Oct., 1977 the super-mini was
launched in market by (DEC).

(c) Main Frame Computer:

A mainframe computer is a large system that has the capability to


support many powerful peripheral devices.

(d) Super computer:

A super computer is a computer system that is characterised by its


very large size and very high processing speed. It is generally used for
complex scientific applications. For example one main super computer in
India has been used for Weather forecast. These are needed in the
research and development areas.

AREAS OF COMPUTER APPLICATION

The main areas of computer application are:

(a) Commercial application:

Many commercial firms use computers for a variety of


applications. It covers the use of computers for clerical, administrative

50
ComputerizedAccounting

and other uses. Here emphasis is on processing i.e. collecting,


maintaining and manipulating volumes of data to produce information. A
manufacturing firm may use computers for data processing, scientific
research and engineering development works. The important commercial
uses are:

(i) Wage roll:

It is a well-established computer application normally handled by


batch processing. The preparation of the weekly wages or monthly
salary payments of employees is a regular repetitive clerical task on
sizeable volumes of data and ideal for computeristion.
i

(ii) Office Automation:

It is a new area of computerisation. Many of the routine clerical


and secretarial tasks are taken over by computer

(iii) Stock control

(iv) Production control

(v) Labour control

(vi) Preparation of Financial and cost accounts

(b) Scientific applications

(i) Weather forecasting system

(ii) Oil resources searching

(c) Engineering applications

(i) Construction of house, road etc.

(ii) Design, of tool and machines

(iii) Electronic design

51
ComputerizedAccounting

(iv) Mechanical design

(v) Aeronautical engineering

(vi) Architecture

(d) Research applications

(i) Mathematical

(ii) Statistical

(iii) Operational research

(e) Financial applications

(i) Automatic cheque clearing

(ii) Standing orders and direct debit

(iii) Current and saving a/c of banks

(f) Medical applications

(i) Medical research in the trial of drugs

(ii) Analysis diagnosis

(iii) Useful for dentists

(iv) Children's health records

(g) Education applications

(i) It is used as an extremely versatile way of aiding the


understanding of wide variety of any subject.

(ii) A computer can guide a user through a course of instruction.

(iii) A computer can provide instructions and ask questions of the


user

52
ComputerizedAccounting

(iv) Marking of multiple-choice examination papers

(v) Processing examination results of university and


examination boards.

Manual aids are replaced by machines in every business


organisation and the field of accounting is no exception of it. In large and
medium sized business units, use of machines for various types of
accounting work has become a matter of routine. Even small business
units are switching over to mechanical devices gradually. This growing
use of machines including use of computers for the accounting work are
basically due to following :

(a) The growth in the size of business unit's results larger accounting
work to be completed in a limited time.

(b) Growing complexities of modem business required more detailed


and correct analysis of accounting data to be supplied to the
management promptly for controlling operations of organisation.

"We know that accounting is the generation of financial


information by recording, classifying, and summarising the financial
transactions. This information are used by various classes of people like
management, owners, creditors, debtors etc. When productions of these
business and financial information are done through computers, it is also
called as electronic data processing (EDP)"2.

2 Siddiqui, S.A. Comprehensive Accountancy, Laxmi Publications, New Delhi, 1995, page no. 353.

53
ComputerizedJlccounting

Working of Computer in Accounting

Recording of transaction in a system


with data entry device e.g, keyboard

Drafting of account based


on the software

Preparation of Financial statements and


other reports like EPS statement, C.Fs

(i) Recording of transaction in a system with data entry devices e.g.


keyboard

(ii) Drafting of account based on the software.

(iii) Preparation of financial statement and other reports like EPS


statements C.Fs.

The computerised accounting involves processing of transactions,


which involves classification of financial and accounting transactions
through sorting, merging and updating reports in the form of trial balance
and balance sheet, which can be obtained after processing.

Computers are now-a-days widely used in scientific research,


business application, pay roll and personnel records, stocks control,
banking, insurance, space technology, communication, education, hotel
management etc.

As discussed earlier accounting is a routine and repetitive work and


computers are much used for routine data processing. They are used in
business because of their speed and accuracy. Other characteristics of

54
ComputerizedAccounting

computers compel us to use computers in business and other organisation


to computerise their accounts.

Accounting as we know is generation of financial information


through recording, analysing and summarising business operations of
financial nature. These business transactions can be recorded analysed
and summarise through computers with speed and accuracy.

The role of computers in accounting can be summarised as under:

(i) Recording and posting business transactions

(ii) Processing and maintaining pay rolls

(iii) Maintaining personnel records

(iv) Effective inventory control

(v) Invoicing of sale

(vi) Preparing bills

(vii) Preparing debtors accounts

(viii) Maintaining purchases and sales ledger

(ix) Linear programming

(x) Feasibility studies

(xi) Integral accounting

(xii) Costing and Budgetary control

(xiii) Classification of accounting transactions through sorting, merging


and updating

(xiv) Reporting in the form of trial balance, ledger balances and balance
sheet.

55
ComputerizedAccounting

Computers are very important in accounting because they perform


accounting operations, with ease, accuracy and speed. Computers are
never tired of performing their accounting operations.

As we know that "To execute accounting in a computerised


environment, we need the hardware comprising of machine itself as well
as software or set of instructions which allow the machine to work.
Accounting software normally takes two forms i.e. Bespoke and
commercial. Bespoke softwares are specifically tailored to the needs of
the organisation and are exclusively written for it. It is a costly exercise.
However, there are many general-purpose softwares available in the
market which are obviously at reasonable price. They are termed as
commercial softwares.

Accounting softwares allow the monotonous work of recording of


repetitive transactions possible by the computers. The computer does the
job with high speed, accuracy, without fatique and hence is very reliable.
Computers do not have mind of their own. They perform what they are
programmed to perform. Hence, if there is some problem with the
instruction or data input, it is going to carry itself to the final output.
Hence, software selected should be such which has some kind of security
check built into it and also according to the needs of the firm".3

Accounting and computers both are concerned with the acquisition,


storage, manipulation and reproduction of information. Accounting as a
science defines the principle concepts, techniques and procedures of
identifying, recording, classifying and interpreting business transactions.

3 Sehgal Ashok, Deepak, Advanced Accounting-I, Taxmann Allied Services Pvt. Ltd, New Delhi,
September, 2001 Page No. 1297.

56
ComputerizedAccounting

Computers practically perform these operations and can be rightly named


as "Accounting Machine".4

Computers play a very significant role in the modem competitive


business world. Following are the advantages derived from computerised
accounting. It can be discussed under following heads:

(i) Advantages of use of computer in accounts department.

(ii) Advantages of computerised accounting in big organisation

(iii) Advantages of hiring the computerised accounting services for


small concern.

(i) Advantages of use of computer in Accounts Department

(a) It provides useful accounting data in a variety of ways at lower cost

(b) It brings economies in operation since it saves a lot of manual


work.

(c) It helps in preparing simultaneously a number of statements

(d) It eliminates drudgery of accounting works by doing -calculation,


casting, balancing, posting etc.

(e) It prepares neat and accurate accounting statements

(f) It helps in disposing of the work at a good speed. For example, in


case of companies, dividend warrants can be sent to the
shareholders of the companies within few days.

4 Siddiqui, S.A. Comprehensive Accountancy, Laxmi Publications, New Delhi, 1995, Page No. 355.

57
ComputerizedRecounting

2. Advantages of computerised accounting in big organisation:

(a) The computer is the most accurate mechanical device of modern


science. Computer is so fast that it leaves behind all human brains
and other modem mechanical aids.

(b) Computer -is always fresh and never get tired like human beings. It
can memories a variety of items. Computer has great capacity to
store.

(c) It presents results in an orderly and systematic way. Neat and clear
presentation is an added beauty of computer.

(d) Computer gives an overall integrated view of business operations.

(e) The routine accounting functions are done at a much faster pace
than what is possible under manual accounting

(f) The accuracy of computerised accounting record is more because


the scope of error in a mechanical system is negligible. If the
quality of input is ensured the output quality is definitely enhanced.

(g) It helps a great deal in generating periodical reports at shorter


intervals, which work very well in a management control system.

■ (h) By working through immense database, computerised system can


help flash the warning signal, if built properly in the software. It
can check which debts are aging beyond proportion. It can signal
which expense heads are rising alarming before it is too late. Such
early warning signal can help the management in taking timely
decisions.

(i) They can help in generating the desired kind of reports, which help
management to discharge their function effectively.

58
ComputerizedAccounting

3. Advantages of hiring the computerised accounting services for


small concern.

(a) Buying of a computer needs heavy investment, but it can be


avoided if computerised accounting services are hired.

(b) Installation cost of computer is also quite heavy. There will be no


such costs if computer services are hired.

(c) The Business organisation will not have to spend anything towards
the operating costs of the computer. The organisation will have to
pay the hire charges for use of the computer.

(d) The firm hiring out computer services have trained and qualified
staff. Thus, accounting work is done with greater accuracy and
efficiency.

(e) The need for getting the existing staff trained or recruitment of new
qualified staff will not at all arise. Thus, there is no question of
training and recruitment costs.

(f) The computerised services can only be used for specific jobs and
not for routine jobs, which can otherwise also be efficiently done
without the use of computers.

(g) Hiring of computer services has the utmost flexibility, the services
may be altered at will, without any financial burdens. There is no
risk of loss due to obsolescence.

(h) Hiring of computer service is ideal and more economical, where


full time use of computer is not required by the small business.

(i) Hiring the computer service does not involve any capital
expenditure, operation and maintenance cost. Financial

59
ComputerizedRecounting

requirements are the least if computerised accounting service is


hired.

Pre-requisites for the success of computer accounting:

(i) Integration of data processing activity in the organisation is


essential for saving of money and achieving centralisation of-
authority

(ii) Centralisation of programming is required since the system


requires special knowledge of equipment and programming
languages.

(iii) The information system of organisation must be properly classified


into major sections like financial, sales, production, personnel and
logistics, and into minor sections also.

(iv) Data about the routine reports of the organisation such as pay-roll,
ledger preparation, stock record keeping etc. should be separately
processed.

(v) The effectiveness of the activities of the organisation should be


evaluated to maintain control on business activities. The
performance appraisal is essential regarding the tasks
accomplished, costs incurred, time taken, general impression about
the departmental utilisation of equipments etc.

FACTORS AFFECTING INTRODUCTION OF COMPUTERISED


ACCOUNTING

Impact of computer is seriously felt in accounting more than any


other department of the business. But, before introducing computerised

60
ComputerizedAccounting

accounting, there are some other factors, which should also be


considered, they are:

(1) Availability of Finance:

For purchasing computer plant, the sources of finance, their cost,


repayment schedule etc. must be carefully considered.

(2) Availability of qualified staff:

The use of computer needs a properly trained and qualified staff.


In case such staff is not available, the existing staff may have to be
trained, if possible or new qualified and trained staff will have to be
recruited.

(3) Accuracy of standards:

If higher degree of accuracy is desired, it can be achieved with the


help of computer. Use of computer, therefore in such cases are
recommended.

(4) Cost-benefit analysis:

The computer should be an economical option. The cost of


acquiring computer should be compared with the benefits derived from it.

(5) Nature of work:

In those cases, where accounting work is more or less of a


repetitive nature e.g. additions, subtractions etc., computer should be used
since they considerably lessen the monotony of such work.

(6) The objective:

The objective to be achieved by the management should be capable


of being effectively achieved through the use of computer.

61
ComputerizedAccounting

(7) The time factor:

Where final statements are readily required after supplying basic


accounting data to the concerned accountant, the use of computer will be
considerably useful for e.g. where a large number of workers has to be
paid weakly wages computer will considerably hasten the process of
preparing pay rolls.

(8) Quantum of work:

The quantum of accounting work to be handled by the computer


should be ascertained before the acquisition of computer. Adequate
accounting work should be available for the computer.

Preliminaries to setting of the computerised accounting:

Following steps will have to be taken before introducing computerised


accounting:

(i) Training of Staff:

The existing staff has to be trained and equipped with modem


technical know how.

(ii) Restructing of organisational set-up :

The present organisational set-up must be overhauled so as to suit


the requirements of computerised accounting.

(iii) Codification system:

Computer can accept data only in code form. Thus, proper


codification is required before we can actually put the computer into use.

62
ComputerizedRecounting

(iv) Re-classification of item:

The accounting items have to be regrouped according to the system


and the old classification might have to be changed so as to adjust
according to the behaviour of the computer system.

(v) Selection of Cards:

When computerised accounting system is to be employed, the


selection of cards poses a problem. The card can be chosen only after
considering the nature of data and the quantum of expenditure.

(vi) Preparation of new forms and documents:

Some new forms and documents will have to be prepared so that


necessary basic data may be fed into the computer. It depends on the
type of computer to be used and the nature of work involved.

63
ComputerizedRecounting

(B)

DIFFERENT APPROACHES TO COMPUTERISATION


OF ACCOUNTS
Computerisation of accounts refers to the use of computers to
perform both routine and specialised functions in every stages of
accounting activity of business. More than eighty percent of accounting
applications of computer involve some kind of data processing. Majority
of business operation, barring a few exceptions, involve some kind of
accounting work. The computers at accounting sections may process data
during an electronic ledger posting operation. The processing to be done
while handling a deposit transaction at cash section is not the same as the
processing done at accounts section for hardware organisation, the
computer used to do the job may be a part of an interlinked net work
enabling the different machines to share the resources available with
other machines in the network or it may be a fully self contained system
known as stand alone computer system studying different types of data
processing techniques.

Stand-alone Computer

The system has all the essential components to make it a complete


system so that it need not make use of or depend upon the resources of
some other system to perform the accounting work of business. Thus,
this system has its own processing power and is attached to its own
printer. These machines would have a limited secondary storage and
would normally be used to perform dedicated function. Microcomputers
are in general stand-alone computer system. The performance feature of
this system can be enhanced by linking it to other facilities over

64
ComputerizedJ&ccounting

communication lines. Thus, this system can be linked to other facilities.


Here, it is necessary that this system would have all the necessary
hardware facilities attached to it needed to perform an assigned task of
business. There is no restriction in this system to access an external
facility, which could be a high-speed printer. In such case, this system
would be operating on the shared resource logic, as it would be sharing
that high-speed printer with many other users. The Electronic Ledger
Posting Machines used in accounts section are an example of this
accounting system. The other concept is that of shared Resource
Architecture. This term is generally used to describe a system
architecture where several terminals or even stand alone type computers
share the tremendous processing power and an extremely large storage
capability of minicomputers and main farm system.

Computer Net Works

In a large manufacturing company having hundreds of branches


located in cities for apart from each other like Vibha LTD;, it would be
desirable to have a communication medium for 'exchange of accounting
information between computer being used in these that are present in
different branches of a company are connected together in such a way
that each one of these computer can work of its own and if the need
arises, it may communicate with other computers through the
communication link. This communication link can be established
through cables or a microwave channel or even through satellite. If these
inter-connected computers are such that they can work independently on
their own too, then this interconnected group of computers is known as
computer Net Work of the organisation. Thus, computer network is a
collection of independent or autonomous computer systems, which are

65
ComputerizedAccounting

connected through a communication medium. In shared resource


arrangement, it is not necessary for the computers participating in that
company to be all-independent once. The objective of a computer net
work is to provide all accounting data and accounting information to the
management connected to the net work with disregard to their physical
location. The important advantage of this type of network is that a
accountant can share the computing ability of a high speed computer if
that happens to be a part of the net work of organisation.

A Local Area Net Work links the computers in some geographical


area i.e. it could be a large building or a cluster of small organisation
located within. Say 500 meters with the object of sharing both
information and hardware. The local area network is specifically
designed for interconnection of computers, terminals and other devices on
a single geographical site. Local Area Net Works can be used to inter
connects computers and other peripherals made by same manufacturer or
can different manufacturers. A computer that is a part of Local Area
Information retrieval and communication without one configuration for a
local area net work of computer and all other devices in the net work are
connected to this central computer. One more popular local area new
work configuration is the Bus Configuration in which a single cable is
routed from station to station to provide linkage. The difference between
these two systems is that in case of the star configuration, each device in
the network can communicate with another device in the network only
through the central controller, on the other hand in Bus configuration
different devices in the network can communicate directly. In actual
practice there may be so many other possible configuration. But
suitability of each type of configuration in a specific case depends upon

66
ComputerizedAccounting

number of devices in the network, type of these devices, the speed with
which the devices need to be accessed etc. in the organisation.

Data Processing Techniques

Each approaches to computerisation of accounts can described


in terms of different approaches to processing accounting data. The
business data processing methods can be classified in to following
parts.

(a) On line processing

(b) Off line processing

Some more methods are developed which are a combination of


above two basic methods. Depending upon the data processing method
architecture the data processing systems are classified as (i) centralised,
(ii) decentralised and (iii) distributed data processing systems. It is
important to note that an on-line processing method could belong to any
one of the three processing method could also be implemented with any
one of these hardware centralised method and an on-line decentralised
system as well. In the same way, an off-line system could be a
centralised, de-centralised or distributed system.

(1) On-line Processing

This process is also known as interactive processing. Here each


item of data is processed immediately as it occurs as business transaction.
In this method input and output devices are under direct control of the
computer. It means input and output devices are directly connected to
company's computer. The organisations computer may be located right
adjacent to the input and output devices and these may be interconnected

67
ComputerizedAccounting

by a piece of cable or these input and output devices may be located


thousands of kilometres away from computer department in this situation,
control is made through telephone line or satellite link. This method is
calied interactive because in this case user company can interact with the
computer at any time and also on-line. It means that inputing accounting
data to or receiving data from the computer is on-line.

Example -1

The popular example of an on-line processing is that of an


accountant in a big trading organisation attending to customer's purchase
requirements. A customer showing his intention to buy a certain goods in
a certain quantity is attended to the accountant by feeding the data on his
requirement in to his terminal and the quantity of the stock of those goods
is displayed on the screen of the computer. In this case if stock of that
goods records the buyer's requirement of that very goods and if there is
no practice of having minimum stock, the demand of this customer is
executed.

Example-2

Electronic ledger posting is another example of on-line processing


system. Let us take the example of Pujari Commercial bank in which Mr.
Kapil making a withdrawal transaction. For this purpose saving bank No.
420, Ledger Folio No. 56, Name of the account holder, amount to be
withdrawn, date on which withdrawn is being made etc. are entered into
computer. The computer immediately processes this information and it
displays the account balance status on the computer terminal. In this case
computer also looks for any instructions and either executes or stops the
payment. Here it is important to note that there is no human intervention

68
ComputerizedRecounting

is involved after entering the information in computer machine.


Following steps are involved in this transaction:

First Step

The computer machine processes this information and then


retrieves the relevant information on the said account from the computer
file containing details of accounts and stored in the secondary storage.

Second Step

The computer machine also looks for any instructions declare the
transaction valid or invalid.

(2) On-line Update

It is also known as on-line real time processing system, because it


is an extension of the on-line processing technique. On the other hand if
in the on-line processing, the computer automatically updated the
information in computer file without any human intervention, this system
is called on-line update processing method.

If in the example No. 1 of trading organisation given earlier in this


chapter, if the processing mode was on-line up-date, the computer
machine would automatically decrease the quantity of goods sold by the
quantum of sales order actually executed by the organisation. In this
system, when the dealing accountant or employee of sales department
makes another on line inquiry for the same goods, the computer machine
displays the current position of stock in hand in the business.

The modem computerised airline, railway reservation etc. are some


important examples of real time processing method. A passenger making
a railway reservation would immediately want to know the availability

69
ComputerizedRecounting

status in the desired class and desired train on the desired date of travel,
train number, class of journey destination etc. are entered into computer
machine. This makes computer system on line. If the Airline company
or Railway company also want to know that its computer machine
immediately update the availability status if the reservation materialises
and thus automatically reduce the number of vacancies by the number of
seats reserved. This additional work answers the dealing accountant the
next inquiry made for the same travel date except for the number of seats
asked. This is an inherent requirement of every air line company or
railway company in its reservation system because there will be far too
numerous operators making on line inquiries from their respective
terminals at different locations.
i

(3) Off-line Processing

In this method processing system function independently of the


main computer. For example, if we converting data from a source
document to a machine-readable format using a keyboard and then
temporarily storing it on a disk before it is fed to the computer machine.
This system of conversion of data is known as off line system of
conversion of accounting data is known as off line. In the same way if
we are collecting accounting data on a magnetic tape over a period of
time using a keyboard to tape unit. The accounting data may be fed to the
computer later for processing and extracting meaningful information out
of it. This processing of collecting accounting data on tape is also called
off line processing. Thus, such function like conversion, storage and
retrieval of data are all examples of offline processing method.

70
ComputerizedAccounting

(4) Batch Processing

In this system data is collected over a period of time and then


processed all at one time. The most important use of this processing
system is in banking transactions like loans, deposits, loan repayments
etc. taking place on a single day being entered into the computer all
desired method. Another example could be accumulation of sales slips
for the sales executed during whole the day or may be for whole the week
in a trading organisation. The entire sales data for the day may be fed to
the computer at the end of the day for processing. In this activity we are
using batch-processing system instead of processing each transaction at
the time it is being executed. Therefore, this method is useful where we
are not interested in seeing the results of transactions immediately after
they are executed. Preparation of salaries sheets are another example of
batch processing method. The batch processing can either be done with
Sequential Access File Storage or with direct access file storage. In case
of sequential Access file Storage, the entire master file is put through the
computer each time the master file is to be updated irrespective of the
number of records that are affected by the input accounting data and an
entirely fresh updated master file is prepared. In this system, before the
master file is updated, the transaction file is sorted into the same sequence
as the master file so that each record is to be read only once during
updating process. On the other hand in the direct access batch processing
method, the recorded in the master file can be updated in place where
they are entered, thus, present records not affected by processing need not
be read out. Thus, in direct access processing we are not required to write
in entirely new file, but only those records affected by transactions are
updated and remaining are left untouched. In a big trading organisation,

71
ComputerizedAccounting

the master file may contain data on a large number of accounts of a


particular type and transaction file may Contain the data on transactions
executed over a definite period of time.

(5) Batch Processing With a Remote computing Facility

Input and output devices of computer in a batch processing set up


could either be stationed right adjacent to the processing computer or
even be thousand of kms. away. In most of the cases the input/output
machines are located at the same place at the computer but in few cases a
remote computing facility with batched input cannot be ignored. The
data in case of remote computing facility is generally transmitted over
telephone lines. When a batch of data is accumulated the input/output
devices are connected to the processing unit so as to feed a batched input
to the computer. The computer processes the data and transmits the
results back to the distant input/out put machines of computer system.

(6) On Line with Batch Update

A little difference from the on line processing system is the on line


inquiry with update in batch system. This system is suitable where an
immediate update would not be necessary. This system is suitable where
actual processing could be done in off peak hours.

(7) Centralised and Decentralised Processing

The centralised data processing is consists of a centrally located


large central computer machine, generally a mainframe system
supporting a large number of peripheral devices. This machine could be
located at the same site as the computer could operate the computer via
telephone lines. In this system the input/output devices are always
remained connected to the computer machine.

72
ComputerizedRecounting

In a big trading organisation large mainframe system supports a


large number of terminals scattered all over the state. An airline or
railway reservation activity is an example of centralised processing
installation where both system development and operations are
centralised. System development function is centralised as one computer
based reservation system is developed for all operators. In this case
reservation offices in different; parts of the state need to have an access to
the same data regarding schedules, fares, availability of seats and so on.

A decentralised data processing system generally consists of a


single microcomputer machine or a minicomputer machine and its
associated peripheral devices. A decentralised installation system is self-
contained having its own operating system and database. Such a system
usually processes accounting data for specific application area. Use of
minicomputer for production scheduling at one of the production plans of
a large organisation is an example of decentralised processing system.
Production scheduling can be best done right at the specific production
department of the business. Systems development here is decentralised,
because production control is done at the production department by
departmental manager. Operation too are decentralised as the data entry,
data processing, use of processing out come are all done at every
production department. In this case, computer at production department
has no interaction with the other computer located at head office of the
business. Use of a minicomputer for preparing accounts or for desk top
publishing or ledger posting are some important examples of
decentralised data processing method.

73
ComputerizedJiccounting

(8) Distributed date Processing on line System with


Minicomputers Networking

In this system centralised and decentralised computers which are


connected with each other are interconnected with a communication
network. Locally place minicomputers and microcomputers can interact
with the central computer machine in order to have an access to the
central data files or to transmit information to the central computer
machine. The concept of this system is originated from the fact that there
are numerous accounting applications where it is felt that many decisions
can be taken at a lower level of the managers of the organisation.

74
ComputerizedAccounting

(C)
CONTROL ON ACCOUNTS THROUGH COMPUTER
PROGRAM

In computer programs accounting data are frequently, collected and-


recorded from source documents. For example attendance register is a
source document from which total attendance for the year or month is
obtained. In same way the answer books become the source documents
from which the marks of examination are taken to prepare the result of an
individual student. Thus Computer program is so synthesized that it takes
up execution of a program sequentially in the increasing order of
statement numbers. The practice is often necessary to change the order of
execution of statement or to repeat a group of accounting statement until
certain specified conditions are meet. Therefore, computer program
control provides facilities for controlling the order of execution of
statements. The statements which provide such facilities are known as
control statements. Following control statements are generally used:

(a) If then statement

(b) Go to statements

(c) On Go to statement

(d) For Next statement

that when a BASIC program is RUN, the Basic statements in the program
are executed in ascending order of their line the lowest line number is
executed first followed by the Basic statement having the next highest
line number and so on till the end of the program. In computer
programming, we will often across situations where we may want to-

75
v ComputerizedRecounting

(a) Repeat an accounting instruction or instructions

(b) Jump over an accounting instruction or instructions.

In both above cases we will have to change, the default flow of


program control. All basic statement which allow us to alter the default
flow of program control are known as control statements.

(a) If_____________ ^_then statements

If we should like to compare two numbers and then perform a


particular task based on the result of this comparison. For example, we
want to know his or her eligibility for vote, and rule is that person greater
than 17 years age is eligible to vote. In this example. "Age is greater
than 17" is the condition and can either be true or false. The condition
will be true if age is greater than, 17, and will-be-false if age is not greater,
than 17. If condition is true, he or she will be allowed to vote. On the
other hand, if the condition is false she or he will not be allowed to vote.
In other words, she or he will perform a particular task if the condition is
true, and a different task if the condition is false. The basic statements
if_____ then is precisely used for this purpose. If______ then statement
is conditional statement. Thus, the program control will branch or jump
to a specified line number in the program depending on whether the
condition in the if statement is true or false. The general form of the
if______ then statements. Line no If condition ___ then line No.
statement.

If the condition following the if statement is true, the line No. /


Statement following the then statement will be executed. On the other
hands, if the condition following the if statement is false then the line
No./ statement following the then statement will be ignored. In other

76
ComputerizedRecounting

words, when an if______then statement is processed two things happen


depending on whether the condition is true or false.

(1) If the condition is true then process this statement

(2) If (the condition is false) then (ignore this statement) for example:

(1) If we eat too many sweets than we will have to visit the doctor.
Here, when we talk about conditions we will be referring to a relation,
arithmetic or logical, between two expressions constants and/or variables.
To understand what is meant by condition, better study the example given
below:

20 if weight 70 then print "Strict Dieting recommended"

30 End

If, we study line No. 20 carefully, we find, that the value of


variable weight is compared with the number constant 70. The
comparison is done using the relational operators (greater than). There are
six relational operators which , can be used to compare two expression
constants and/or variables. These are listed in table

Table No. 1

Relational Test forcan be used with Examples


Operator strings numbers
= Equality Yes Yes AB
o Inequality Yes Yes AB
> Greater than Yes Yes AB
< Less than Yes Yes AB
>= Greater than or Yes Yes AB
equal to
<= Less than or Yes Yes AB
Equal to
Weight can now re-write the condition age "is greater than 17" as.

77
ComputerizedJlccounting

Age 17

We may therefore use any combination of the symbols to depict


any condition we like.

Let us get back to if statement and understand how it operates. If


the condition following, the If statement is true, then statement will be
executed. On the other hand, if the condition following the If statement is
false then the line no. Or the statement following the then statement will
be ignored.

(b) Go-to Statement:

The Go to statement is the simplest basic statement of that allows


us to alter the default flow of program control

Syntax:

Line No. Go to X

Here:

X is the line number of the statement to which we wish to send


program control.

Example:
100 Go to 240 (For forward jumping)

100 Go to 20 (for backward jumping)

Solution
10 REM X Go to

20 Print "Happy Marriage"

30 Go to 20

40 End

78
ComputerizedRecounting

Run

When we run this program we will see the screen fill wish string
constant "happy marriage" and will continue to be printed endleslly. The
only way we can stop the program without losing it is by pressing both
the "Ctrl" (Control) and the "Scroll lock" keys simultaneously.

In this example, we have just written our first program with a loop.
Let us follow program control through the program to understand that
really happens. When we Run the program, program control first passes
through line 10. Line 10 is ignored because it starts with the keyword
REM. Program control then moves on to line 20. Line 20 displays
"happy Marriage" on the screen and program control passes on to line 30.
The Go to statement in line 30 will then send program control back to line
20. "Happy marriage" is printed once again on the display screen and
program control is transferred to line 30. Line 30 once again sends
program control back to line 20. This process will continue to repeat itself
and shall never come to an end. What we have here is an endless or an
infinite loop.

Summary of What happens in the program

Line No. Keyword Action

10 REM REM Statements are ignored and are not


executed by the Basic interpreter.
20 Print Displays the string "happy Marriage"
30 GOTO Send program control back to line 20.
40. End End the program.

79
ComputerizedRecounting

We can also use the Go To statement to perform a forward jump.


Example :

5 REM (Forward jump) (no loop)

10CLS

20 Print "This is line 20"

25 Go To 40

30 Print "This is line 30"

40 End

When we Run this program the message line 30 is not displayed because
the Go To statement in line 25 causes program control to jump directly to
line 40.

(C) On----------------- Go To Statements:


These statements are conditional transfer statement similar to If-—
Then statement, while the simple Go To statement allows only one
transfer point and If-------- Then allows two transfer point, the on------
Goto can have more than two transfer points, thus providing multiple
branching facility. The general format of this statement is :
i

On (Numeric Variables or Expression) Go To Nl, N2, N3, N4—


Here, Nl, N2, N3, N4 are the statement line numbers.

When On------- Go to statement is encountered, than the


expression is evaluated and rounded off to a positive integer value. The
control is transferred to a statement as shown below:

Integer
Action
Value

80
ComputerizedAccounting

1- Program jumps to statement N1

2- Program jumps to statement N2

3- Program jumps to statement Nn and soon.

If any integer value is less than once or greater than the total
number of line numbers given in the list then an "out of range" error
message will occur.

(D) For------------ Next statement:

This is also called For—Next loop if we want to display the string


"HAPPY MARRIAGE" seven times on the screen. The best way to do
this would be to create a loop and execute the program line 20 Print
"HAPPY MARRIAGE" seven times. The Basic statement For---- Next
statement allows us to control the number of times the Basic statement
within a loop will be executed. The loop formed by a For----- Next loop
is a finite loop because, it will operate only a fixed number of times.

Syntax:

For no start number to end number (Step x)

NextN

Here

N = is a numeric variable that keeps a count of the number of times


the loop has operated. Thus it is also called the loop counter. Start
numbers the number from which the loop counter will start counting.

End number The number at which the loop counter will stop
counting and exit the loop.
(Step x) It called parameter and it is optional

81
ComputerizedAccounting

Main parts:

For----- Next statement has two main parts. These are:


1- The for part-which indicates the beginning of the loop, and
2- The Next Part------ which represents the end of the loop.
The Basic statements that lie within a For-------- Next loop make
up the "body of the loop".

Examples:

100 For A = 1 to 7

(Basic Statement----------------- Body of the loop-------------)

200 next A

Let us rewrite "HAPPY MARRIAGE" seven times using for----


next statement.

5 REM A finite loop

10CLS

20 For A = 1 to 7

30 Print "HAPPY MARRIAGE"

40 Next A

50 END

When we Run this program we will see that the string "HAPPY
MARRIAGE" is displayed seven times on the screen. Just as we had
wanted. Let us follow program control to see what actually happens in a
For------ Next loop.

For A = 1 to 7
Body of the loop

82
ComputerizedAccounting

Next A
Cheek of loop counter = end number
(A = 7, exit the loop)
A pictorial representation of how a For-------- Next loop operates,
method of a loop counter counts and controls a For------ Next loop.

Loop Count Loop counter Loop count = End number

1 A=1 1 No.

2 A= 1+1 = 2 No.

3 A = 1+1+1 =: 3 No

4 A —l+l+l+l= 4 No

5 A =1+1+1+1+1= 5 No

6 A =1+1+1+1+1+1=6 No

7 A=T+1+1+1+1+1+1= 7 Yes

When the For statement in line 20 is executed for the first time the
loop counter is assigned a value equal to the start number. In this
example the loop counter "A" will therefore be assigned a live of 1. Next
line 30 is executed and the string "HAPPY MARRIAGE" is displayed on
the screen. Program control than goes to line 40 . Here, the value of the
loop counter is compared with that of end number in the For statement. If
the value of the loop counter is less than the value of end number, one is
added to the loop counter and program control is transferred back to the
For statement. This process will be repeated till finally the value of the
loop counter is equal to or greater than the value of end number. The
result is, the Print statement in line 30 is executed seven times before

83
ComputerizedRecounting

program control passes on the line 50. Here the counter "A" is used to
deep a count of the number of times the loop has been executed.

Points to Remember

1. Every For must have a corresponding next, if we forget to enter a


next, an error message of the type.

For without next in (line No.)

On the other hand, if we enter a Next statement but forget to enter a


For statement we will get an error message of the type shown below:

Next without For in (line No.)

2. The variable used in both the For and the Next statement must be
same.

For N = 1 to 7

Next N Same variable

Here too an error message of the type "For without Next" will be
displayed if the variables are not the same.

Example

Write a program to display the 3 x times multiplication table. One


way of doing this is to have twelve separate print statements of the type
shown below:

10 Print 3x1=31
20 Print 3 x 2 = 32
30 Print 3 x 3 = 33
40 Print 3 x 4 = 34
_____50 Print 3x5=35
1210 Print 3x12= 312

84
Computerizedjlccounting

Now that we know how to control a Loop we can get the same
result with just three basic statements.

5 REM Multiplication table of three

10 for A = 1 to 12

20 Print 3 x A = 3A

30 NEXT A

40 END

We must have also noticed that the Loop counter "A" has been used in
the arithmetic expression in line 20. One important point to remember
here is that we must not change the value of "A" within the body of the
loop. If we do so the loop will not operate the number of times specified
by end number.

Know, we will modify the above program to display the


multiplication table of any number.

10 REM** Multiplication table of any number.

20 In put "display multiplication table of, N

30 FOR A = 1 to 12

40 PRINT N "X", A, N*A

50 NEXT A

60 END

STEP

In a simple For—Next statement the value of the loop counter is


increased by one in each time program control passes through the loop.
The step option of the For-Next statement allows the value of the loop

85
ComputerizedRecounting

counter to be increased or decreased by a value equal to step. To


understand this fact better, see the following example:

Example: To display a list of even numbers from 2 through 20,

5 REM** Even numbers from 2 through 20

10 FOR A = 2 to 20 STEP 2

20 PRINT A,

30 NEXT A

40 END

The step 2 options in line 10 will increase the value of the Loop
counter "A" by 2 each time the NEXT statement is executed. We can
also make the loop count backwards by using a negative value in step.

Example:

5 REM ** Counting backwards

10 for A - 100 to 0 step -20

20 PRINT A

30 NEXT A

In such a case the start value must always be greater than the end value.

If we type step and forget to give it a value we shall get error


message of the type show below:

Missing operand in (Line No.)

If step is omitted in a For--------Next Loop the default step value is +1

Trick Alt + f will display the keyword For

Alt + N will display the keyword Next

86
ComputerizedAccounting

Marketing the Computer Count

We can make the computer count by creating what is called a


"counter". We know that the contents of a variable or the value assigned
to a variable can be changed as often as we like. We shall take advantage
of this property of variables to create a counter. To create a counter all
we have to do is take a numeric variable assign it an initial value and than
change its value as many times as we like. The value by which we
increase or decrease the value of the variable must be fixed. If we do not
assign the variable an initial value, than the variable shall automatically
be assigned a value equal to zero.

Example

A = 5

A = 10 Here we are increasing the value of A by 5 each time

A = 15

A = 20

Let us say want to count in ones like 1,2,3,4--------- 20 and so on. We


can do by adding, to the number presently stored in the variable.

Example

A = 0+1

A = 1+1

A = 2+1

A = 3+1 and so on.

In a counter we use a statement of the type shown below

A = A+l

87
Computerized'Accounting

String Manipulation

Like adding, subtracting, dividing and multiplying, basic also lets


we manipulate strings. Some of the things that we can do to a String are-
combine two or more Strings, extract a part of String or even compare
parts of two Strings.

LEN:

The LEN function returns the length or the number of characters in


a string.

Syntax:

Line No. 1 = Len (String constant / variable)

Example:

10 A $ = "INTERFACE"

201= LEN (AS)

30 PRINT 1

RUN '

When we Run this program we will see the number 1 appear on the
screen. This is because the String "INTERFACE" - Consists of nine
characters. LEN ( ) counts the number of characters in the String
"INTERFACE" and store the result in the numeric variable 1. To find out
the length of the String, all we have to do is display what LEN () has
stored in I. Here, it is not necessary to store the result of LEN ( ) in a
numeric variable. We can also use LEN () directly in a PRINT statement
as follows :

88
ComputerizedAccounting

10 A$ = "INTERFACE"

20 PRINT LEN (AS)

Now, we will see that we will get when we have a String with two
or more word in it.

NEW
AUTO
10CLS
20 AS = Interface "Information Technology"
301 = LEN (AS)
40 PRINT I
50 END
RUN
32
When we run this accounting program the numeric variable "I" in
line 30 will be assigned as value of 32. This is because there are 30
characters and 2 spaces in the String "Interface Information Technology".
Thus, BASIC considers a space to be a character as well.

Combining Strings

We can combine two or more String in much the same way as we


would add two or more numbers with the "+" For example

Example

10 AS = "GOOD"
20 B$ = "MORNING"
30 $ = A$ + B$
40 PRINT C$
RN
GOOD MORNING

89
ComputerizedAccounting

In line 30 of above example the string variables A$ and B$ have


been joined together, using the arithmetic "+" sign. The result is a new
String "GOOD MORNING" which is stored in the String variable C$.
The process of joining together of Strings is known as concatenation. We
can concaten String variables and String constants both. We may join as
many String, as we like so long as the resulting string does not have more
than 255 characters. For example

10 F$ = "TOM"

20 L$ = "JERRY*

30 C$ = F$ + + L$

RUN

TOM & JERRY

Extracting Strings

When we remove a character or a group of characters from a String


we are extracting a String from a String. The String we extract form an
existing. String is called a sub-string, while the String from which we
extract a such String is called the parent string. The BASIC functions
LEFT $ (),

RIGHT $ ( ) and MID $ ( ) are used for extracting a Strong from and
existing String.

Mid $()

Let we extract a substring from any part within a parent string.

90
ComputerizedAccounting

Syntax

Line NO-A$ = MID $ (BS, C(D))

Here:

A$ is the substring to be extracted by the function

B$ is the String from which a$ is being extracted

C is the position of the beginning character is B$ from which

A $ is to be extracted

D is the number of characters to be in A $ from B$. If D is not specified


than all characters to the right of C will be returned.

Example:

10 B $ = "MONKEY TRICKS"

20 Q$ = MID $ (B$, 3,3)

RUN

KEY

The MID $ function in line 20 will extract a substring of three


character, Starting at the third character in the String "MONKEY
TRICKS" and store it in the string variable A$. If we take a look at the
string "MONKEY TRICKS" and store it in the string variable A$. If we
take a look at the String "MONKEY TRICKS" once again, we find that it
consists of a total of thirteen characters, including the 10 blank space
between MONKEY and TRICKS. We know that a blank space is also
considered to be a character.

The MIDS function is very easy to understand and use so long as


we remember that the first number in MIDS ( ) indicates the location in

91
ComputerizedAccounting

the parent String from where MIDS will start extracting a substring and
substring and second number in MIDS () indicate how many characters
should be extracted from the parent String. If we try to extract more
characters than there are in the parent String. If we try to extract more
characters then there are in the parent String we will get only as many
characters as there are to the right of the Starting point specified in MID
$. For example:

10 B$ = "HIPPOPOTAMUS"

20 A $ = MID $ (B$, 6,12)

30 PRINT A $

RUN

POTAMUS

If we leave "D" out, e.g. do not specify the number of characters in


the substring, than the substring will consist of all the characters to the
end of the String. For example:

10 B$ = "HIPPOPOTAMUS"

20 A $ = MID $ (B$, 6)

RUN

POTAMUS

The only error we could possibly make is to specify a Starting


position of less than one.

20 A $ = MID $ (B$, 0, 7)

In above case we shall get an error message of the type shown below:

Illegal function in (line No.)

92
ComputerizedRecounting

On the other hand, if we use a correct Starting position and specify


a length of 0 (Zero). We will not get an error but a substring with no
characters in it. It is also called null String.

Left $ ( )

The Basic function Left $ will remove or return a substring


comprising the left most in characters of a String expression.

Syntax:

Line No. A $ = LEFT $ (B$, x)

Here:

10 B$ = "BUSINESS"

20 A $ = LEFT $ (B$, 3) - -

30 PRINT A$

RN

BUS ' ’

When we RUN this program we will see the String "Business"


displayed on the screen. It is because the Basic function left $ in line 20
will extract the left most three characters from the parent string
"Business" and store it in the String variable A$. If we forget to enter the
number of characters top be extracted by left $ ( ), we shall get a "syntax
error in (line No.) message.

Right $ ()

The RIGHT $ function will also extract or return a substring


consisting of N characters, but from the right most sick of the parent
String.

93
ComputerizedRecounting

Syntax:

Line No. A $ = RIGHT $ (B$, x)

Here:

A$ is the substring extracted by the function.

B$ is the parent String from which A$ is extracted

X is the number of characters to be extracted from the right most side of


the String B$.

Example:

10CLS

20 B$ = "MONKEY"

30 A $ = RIGHT $ (B$, 3)

40 END

RUN

KEY

If we forget to enter the number of characters to be extracted by


RIGH $ (), we shall get a syntax error in (line no.) message.

94

You might also like