Re: a.i
- Posted by Rom <kjehas at frisurf.no> Nov 23, 2002
- 2351 views
From: "Kat" <kat at kogeijin.com> > ..... > Would the Ai know who these nicks are, normally, given only the > intelligence i those lines? This is an example of why you haveto build = in methods of > determining data, what it means, and instanciating new methods to = manipulate the data.=20 > Some things no one can predict, and these events > raise errors at the = worst times.=20 Very true.=20 If you mean that uninstanciated vars will raise logical errors ... very = true. You are appraching what essensially is a design flaw in modern computer = languages, including Euphoria. While it may be too late to do anything = about the design flaws in C, it is maybe not too late to correct the = design flaw i Euphoria. I am afraid this design flaw has to corrected = before Euphoria can truely be usable for formulating logic. The design flaw in Euphoria is the same as expressed in this pascal = documentation: "A Boolean variable can assume the ordinal values 0 and 1 only, but = variables of type ByteBool, WordBool, and LongBool can assume other = ordinal values. An expression of type ByteBool, WordBool, or LongBool is = considered False when its ordinal value is zero, and True when its = ordinal value is nonzero. Whenever a ByteBool, WordBool, or LongBool = value is used in a context where a Boolean value is expected, the = compiler will automatically generate code that converts any nonzero = value to the value True." This is NOT correct boolean logic. Neither Pascal nor Euphoria can = handle uninstanciated vars correctly. "a > 1" is such a structure that = implicitly uses a boolean var that cannot always be resolved, that means = the value of the var is undecidable. Then the result is neither true not = false! But Pascal and Euphoria will not catch that result. So the control structure should have been like this: if a > 1 then .... -- a > 1 is true ifnot then .... -- a > 1 is false ifnil then ... -- a > 1 is undecidable The truth table is like this: (a > 1) result true -> true false -> false a is uninstanciated -> nil Rom