Yes! That might be kind of normal for something to sometimes be true and sometimes false. Couldn't the following code be useful someplace?

S IEN="@"
F  S IEN=$O(^DATA(IEN),-1) Q:(IEN-1)  D
.some more code

Jim Gray

----- Original Message ----- From: "Gregory Woodhouse" <[EMAIL PROTECTED]>
To: <hardhats-members@lists.sourceforge.net>
Sent: Wednesday, September 07, 2005 6:57 AM
Subject: Re: [Hardhats-members] Objects vs. Types


If true = 1 and false = 0, then what is true + 2? If true is simply non-zero, then what is true - 1? It seems that it must sometimes be true and sometimes be false.
===
Gregory Woodhouse
[EMAIL PROTECTED]

"It is foolish to answer a question that
you do not understand."
--G. Polya ("How to Solve It")


On Sep 6, 2005, at 11:37 PM, Jim Self wrote:

Gregory wrote:

No, because it has no meaning -- at least in a model theoretic sense.


That seems like an unecessary and silly restriction that applies only if you use a model that doesn't allow logical values to be treated as numeric values. In some models of logic, truth values range between 0 (false) and 1 (true), like probabilities.

Meaning is assigned by the people who make the models and by those who use them.

In MUMPS we have a model of computation that allows any operator to be applied to any atomic value. Logical operators return 0 (false) or 1 (true) and any numeric value other than 0 is logically the same as 1. That seems very practical, useful, robust, easy to understand and remember and work with - important considerations for a system that handles
extensive and varied user input.


It could (reasonably) be argued that "Colorless green ideas sleep
furiously" has meaning, but it would be incoherent to say the terms
in this sentence could denote anything


overly generalized - counter examples steganography, code phrases.


(just as it is incoherent to say that a number is both even and odd).


Perhaps, but it could be simply mistaken.
Then again, it could be rounding error.

And, of course, most numbers are neither even nor odd. ;)

even(n) ;function - returns true for even numbers
    q n#2=0

odd(n) ;function - returns true for odd numbers
    q n+1#2=0

evod(n) ;function - returns true if n is even and odd
    q $$even(n)&$$odd(n)

What do you get when n=1234567890123456789. ;)



On Sep 6, 2005, at 7:01 PM, Jim Self wrote:

Why do you assert that 1 + true is nonsense? Just because it is not
allowed in some programming languages?


---------------------------------------
Jim Self
Systems Architect, Lead Developer
VMTH Computer Services, UC Davis
(http://www.vmth.ucdavis.edu/us/jaself)


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/ bsce5sf
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to