Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Examine vs Inspect
I asked in J4 and here is the information that I received back.
***

ANSI X3.23-1974, Appendix A, The History of COBOL, has the following:

Page XIV-11,  2.3.2, Overview of the Revised Module under 2.3, Differences
between X3.23-1968 and the Revised Standard:  "The EXAMINE statement has bee
n
deleted in favor of the more general and powerful INSPECT statement.  The
INSPECT statement provides the ability to count (Format 1), replace (Format 
2)
or count and replace (Format 3) occurrences of single characters or groups o
f
characters in a data item."

Page XIV-29, 2.3.3, Substantive changes, item 49:  "EXAMINE statement and th
e
special register TALLY were deleted."  This entry carries the indication tha
t
existing programs may be affected and the remark "Function was replaced by t
he
INSPECT statement."   Item 50 contains a "condensed" version of the descript
ion
of INSPECT from 2.3.2.

EXAMINE is listed among items deleted from the revised standard on page XIV-
31
under 2.3.4, simply indicating that it is replaced by the more powerful INSP
ECT.

I suspect one of the reasons for using a different verb (INSPECT vs. EXAMINE
)
was to eliminate any possible ambiguity arising from the fact that EXAMINE .
.
TALLYING affected a special register (TALLY) in '68; this register was
eliminated in favor of user-specified data items in the TALLYING forms of
INSPECT.  Also, EXAMINE tallied everything into TALLY as I recall, which mea
ns
that doing multiple tallies in a given EXAMINE was, if not impossible, at le
ast
no more than marginally useful.  Allowing separate data items with INSPECT
eliminated that restriction.  This is in addition to the ability to combine
TALLYING and REPLACING, or both, in a single INSPECT, which the '74 standard
indicates wasn't legal in '68.

***

FYI, as long as I have been following COBOL there has been a "direction" to 
get
rid of (and avoid adding) special registers (and figurative constants).  For
example, in those implementations that first introduced "length of" it creat
ed a
special register, but this was NOT how it was added in Standard COBOL.  (Sam
e
for ADDRESS OF and NULLS figurative constant)

--
Bill Klein
wmklein <at> ix.netcom.com



Report this thread to moderator Post Follow-up to this message
Old Post
William M. Klein
10-08-07 11:55 PM


Re: Examine vs Inspect
William M. Klein wrote:
> I asked in J4 and here is the information that I received back.

[snip]

> I suspect one of the reasons for using a different verb (INSPECT vs. EXAMI
NE)
> was to eliminate any possible ambiguity arising from the fact that EXAMINE
 ...
> TALLYING affected a special register (TALLY) in '68; this register was
> eliminated in favor of user-specified data items in the TALLYING forms of
> INSPECT.  Also, EXAMINE tallied everything into TALLY as I recall, which m
eans
> that doing multiple tallies in a given EXAMINE was, if not impossible, at 
least
> no more than marginally useful.  Allowing separate data items with INSPECT
> eliminated that restriction.  This is in addition to the ability to combin
e
> TALLYING and REPLACING, or both, in a single INSPECT, which the '74 standa
rd
> indicates wasn't legal in '68.

Ah - that makes sense.  There were a few programs that still had
references to registers in them when I got to my first shop, and I never
did figure out what that was for - that must be what one of them was.  :)

> FYI, as long as I have been following COBOL there has been a "direction" t
o get
> rid of (and avoid adding) special registers (and figurative constants).  F
or
> example, in those implementations that first introduced "length of" it cre
ated a
> special register, but this was NOT how it was added in Standard COBOL.  (S
ame
> for ADDRESS OF and NULLS figurative constant)

That's a good thing, IMO.  With user defined data names, you know
exactly what you've got.

I really appreciate this detailed information.  :)  Thanks!

--
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~
~     / \/ _ o     ~          Live from Albuquerque, NM!          ~
~     _ /\   |     ~                                              ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ Business E-mail  ~ daniel @ "Business Website" below            ~
~ Business Website ~ http://www.djs-consulting.com                ~
~ Tech Blog        ~ http://www.djs-consulting.com/linux/blog     ~
~ Personal E-mail  ~ "Personal Blog" as e-mail address            ~
~ Personal Blog    ~ http://daniel.summershome.org                ~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~

GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ !O M--
V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e h---- r+++ z++++

"Who is more irrational?  A man who believes in a God he doesn't see,
or a man who's offended by a God he doesn't believe in?" - Brad Stine

Report this thread to moderator Post Follow-up to this message
Old Post
LX-i
10-09-07 02:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 03:21 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.