Re: checking if NUMERIC
- From: Binyamin Dissen <postingid@xxxxxxxxxxxxxxxxxx>
- Date: Sun, 21 Oct 2007 09:55:21 +0200
On Sun, 21 Oct 2007 14:01:53 +1300 "Pete Dashwood"
<dashwood@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
:>"Binyamin Dissen" <postingid@xxxxxxxxxxxxxxxxxx> wrote in message
:>news:8jdkh39o3nfprmdit5jok7lpna84dkvqkl@xxxxxxxxxx
:>> On Sun, 21 Oct 2007 02:47:59 +1300 "Pete Dashwood"
:>> <dashwood@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
:>> :>1. The compiler controls what gets moved to fields.
:>> :>2. The compiler recognises types.
:>> :>3. Given a type (Class in COBOL) of "numeric" the compiler should ensure
:>> it
:>> :>actually IS numeric when you use it. If it is unable to do so, then
:>> there is
:>> :>little point in having such a numeric class in the language.
:>> :>Other languages which support types, check the types and do not allow
:>> :>invalid data in them. (hence the need for casting and explicit "convert"
:>> :>functions in languages like C#...)
:>> Obviously you have failed to learn the concept of records, where storage
:>> areas
:>> may contain different types of data depending on context.
:>Obviously? :-)
:>I'm sure you're right. It is probably amongst the many things I have failed
:>to learn over 40 years in IT.
:>(Makes you wonder how I make a living really, doesn't it? :-))
I have seen those in the field that make money despite lack of ability. As a
side point, I am not making that claim about you.
:>One of the things I HAVE learned, however, is to question the accepted
:>practice, and try to think about things from different perspectives.
:>Sometimes, this pays off; sometimes it doesn't.
:>If the only way to think about data was as record formats, Relational
:>Databases would be a bit pointless, but Messrs.Codd and Date were not
:>limited by the current perceived wisdom at the time they formulated the
:>Relational Model.
Sometimes data is best accessed relational, sometimes it is best accessed
hierarchical. Sometimes it is best accessed as elementary fields, sometimes it
is best as records. (Best includes space, speed, integrity, etc. - not all
applications run on a dedicated PC - most involve servers).
One point you seem to be missing is that COBOL is not the "best" language for
all applications and that to change it in the way you suggest, while perhaps
making it better for your needs, would make it much worse for other needs.
Perhaps COBOL compilers should instantiate the nanny/Dashwood option which
would generate code to validate numerics/alphabetics at each operation that
might affect such a field. The compiler would also need to warn if any
overlays or group moves had mismatched types. Some might find it useful. Most
would find it a pain.
You might wish to expand your repertory to other languages and use the one
that best fits the application.
--
Binyamin Dissen <bdissen@xxxxxxxxxxxxxxxxxx>
http://www.dissensoftware.com
Director, Dissen Software, Bar & Grill - Israel
Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.
I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.
.
- Follow-Ups:
- Re: checking if NUMERIC
- From: Pete Dashwood
- Re: checking if NUMERIC
- References:
- Re: checking if NUMERIC
- From: Pete Dashwood
- Re: checking if NUMERIC
- From: Robert
- Re: checking if NUMERIC
- From: Pete Dashwood
- Re: checking if NUMERIC
- From: Robert
- Re: checking if NUMERIC
- From: Pete Dashwood
- Re: checking if NUMERIC
- From: SkippyPB
- Re: checking if NUMERIC
- From: Pete Dashwood
- Re: checking if NUMERIC
- From: Robert
- Re: checking if NUMERIC
- From: Pete Dashwood
- Re: checking if NUMERIC
- From: Binyamin Dissen
- Re: checking if NUMERIC
- From: Pete Dashwood
- Re: checking if NUMERIC
- Prev by Date: Re: checking if NUMERIC
- Next by Date: Re: checking if NUMERIC
- Previous by thread: Re: checking if NUMERIC
- Next by thread: Re: checking if NUMERIC
- Index(es):
Relevant Pages
|