Question about checks for min and max values
Henry Melancon
hemelancon at gifinc.com
Tue Jul 26 13:49:14 PDT 2005
When I initially asked the question on this topic, I had no idea it would generate this much discussion.
I was unhappy that Filepro was treating a blank field the same as zero in a numeric comparison. If I indicated zero as a minimum, I did not want a blank field to be acceptable and treated the same as zero.
I will just have to add more code and live with it.
Thanks for all the interesting input.......Hopefully this is the last word on this thread.........
Henry
> -----Original Message-----
> From: filepro-list-bounces at lists.celestial.com [mailto:filepro-list-
> bounces at lists.celestial.com] On Behalf Of Nancy Palmquist
> Sent: Tuesday, July 26, 2005 2:38 PM
> To: Christopher Yerry
> Cc: filepro-list at seaslug.org
> Subject: Re: Question about checks for min and max values
>
> Christopher Yerry wrote:
> >>>You think "" eq "0" is bad? You should have heard me when I first
> >>>discovered
> >>>that "abcdefg" eq "abc" !
> >>>But even that is perfectly OK and logical and useful (actually _very_
> >>>useful) and doesn't get in the way or cause any problems as long as you
> >>>know
> >>>about it.
> >>
> >>It may be useful, but I continue to assert that it is neither logical,
> >>nor OK.
> >>
> >>The semantics of "=" are *very* well defined in the discipline of
> >>programming language design, and language designers override them at
> >>their peril. Spelling it differently (ie: "eq") doesn't *really* get
> >>you off the hook.
> >>
> >>IMHO.
> >
> >
> >>Didn't Nancy once point out that in truth, filepro was around before
> most of
> >>these other languages and there was no such standard at the time fp was
> >>created, and in fact filepro's behavior adheres to the standards of
> basic
> >>math and logic which were worked out looooong before annnnnnny
> programming
> >>language? And it's most current programming languages that deviate?
> >
> >
> > I don't know what Nancy Said (Although I doubt she said this). I have
> been coding since the early
> > 70's (1973 Digital pdp8 os/8 with massive a 128k that filled a cabinet).
> And we used "=". filePro
> > was out in the trs80's in 1976 - 1977 ? That date is after 1973, (OS/8
> Basic (ITT Teletypes),
> > FORTRAN, (pascal and COBOL -IBM 36 on punch cards!!!)). These all had
> "=". C (and B )had ":=" or
> > "==" - still does; C# retained this too. So the "That's how it used to
> be doesn't fly".
> >
> > Additionally filePro was written in "C" or "B" as far as I have been
> told. That standard is "==".
>
>
> Just because filePro is written in C does not require the syntax of
> filePro to be "C like". The user interface for filePro which determined
> the syntax and implementation of the language was determined by the
> filePro development team.
>
> As I recall the first release of the IF:/THEN: version of filePro, it
> only allowed "eq, gt, ge, lt, le" relational operands on the IF line of
> a statement. The "=" sign was reserved for the assignment function on a
> THEN: line.
>
> This thread has wandered far from the first postings that were
> discussing the difference between "Equivalence" and "Equals" and the use
> of the "eq" and "=" symbols.
>
> The fact that == or any other function available in C was around or not
> at the time is not relevant. FilePro determined how it would act and
> use these symbols. This was defined by the filePro application and
> presented to the end user as such. When I typed "5 eq ab" on an IF
> line, filePro parsed that and made the determined interpretation of that
> statement resulting in a TRUE or FALSE. The rules for this were clearly
> defined by filePro.
>
> I think this has turned in to a comparison of languages and none of this
> is important to how these functions are defined to behave IN FILEPRO.
>
> In the last 25 years, computer languages have developed and added much
> nuance to logic and functions to enhance what can be done. All to make
> things clearer and easier to program. The early version of filePro had
> 10 commands, but the logic to determine the relationship between
> expressions has not change one bit.
>
> The rules were taken from mathematics and they remain consistent and
> correct. Just because other languages have added meaning or used the
> symbols differently for relationships does not make filePro wrong. As I
> see it, they added meaning to some symbols to offer more levels of
> comparison.
>
> Filepro added the COMPARE() function, that will compare two strings and
> will be true only if length and case are the same. This is what some are
> trying to make the "eq" operand determine.
>
> Mathematics is a set of rules. Once the rules are determined and
> accepted, the mathematics can be developed to determine other "truths".
>
> Computer languages are the same, filePro defined the rules and
> assumptions, you build your programming from there. I realize some
> programmers would prefer to have the rules determined by other languages
> or systems, but that does not change the fact that filepro has already
> defined the rules, long ago, that would be basic to filePro. I find
> them to work well and don't see how they seem to offend so many. I
> don't see any conflict with mathematical standards of logic for
> equivalence and equality.
>
> Well I have made my argument. I do not suggest that any other language
> is incorrect or that any person posting is wrong. We are just seeing
> the rules a little differently. I apologized for the rant. Can't help
> myself today.
>
> Have an "equivalently" fabulous day.
>
> Nancy
>
>
>
>
>
> --
> Nancy Palmquist MOS & filePro Training Available
> Virtual Software Systems Web Based Training and Consulting
> PHONE: (412) 835-9417 Web site: http://www.vss3.com
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
More information about the Filepro-list
mailing list