I can see your point as well. Like I said, this is a "wouldn't it be nice
if?"  question, but if the implications are too severe and/or the
community doesn't like the idea, then it probably isn't worth it.
Otherwise, it would be nice.

Thanks,
Ryan



On Sat, 1 Sep 2001 [EMAIL PROTECTED] wrote:

> I certainly understand where you're coming from, and the suggested
> behaviour vis-a-vis slot types makes sense; I can keep this in mind
> for a future version. Jess's slots are currently very weakly typed, so
> this really can't be accomplished nicely right now.
>
> It's kind of like asking if you could have a Java variable named
> 123D. It's certainly unambiguous if you write
>
>    int 123D = 3;
>
> but of course Java still doesn't let you have variables named
> 123D. The changes to the language would have to be pretty
> fundamental.
>
> I think Ryan wrote:
> > Hello Again,
> >
> > We were wondering of it would be possible to define a slot as a string so
> > that the integer.parseInt and Double.parseDouble would be skipped for this
> > datatype (and perhaps others). See below.
> >
> > Thanks,
> > Ryan
> >
> > WHAT WOULD BE NICE -------------
> > Jess, the Java Expert System Shell
> > Copyright (C) 1998 E.J. Friedman Hill and the Sandia Corporation
> > Jess Version 5.2 5/3/2001
> >
> > Jess> (deftemplate numletters
> >          (slot numletter (type STRING))
> > )
> > TRUE
> > Jess> (assert (numletters (numletter 12345670D)))
> > <Fact-0>
> > Jess> (facts)
> > f-0   (numletters (numletter 12345670D))
> > For a total of 1 facts.
> > Jess>
> >
> > THE WAY JESS REALLY WORKS -------------
> > Jess, the Java Expert System Shell
> > Copyright (C) 1998 E.J. Friedman Hill and the Sandia Corporation
> > Jess Version 5.2 5/3/2001
> >
> > Jess> (deftemplate numletters
> >          (slot numletter (type STRING))
> > )
> > TRUE
> > Jess> (assert (numletters (numletter 12345670D)))
> > <Fact-0>
> > Jess> (facts)
> > f-0   (numletters (numletter 1.234567E7))
> > For a total of 1 facts.
> > Jess>
> >
> >
> > ---------- Forwarded message ----------
> > Date: Thu, 23 Aug 2001 16:58:16 -0700 (PDT)
> > From: [EMAIL PROTECTED]
> > To: Ryan <[EMAIL PROTECTED]>
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: JESS: asserting a number with D or F at the end
> >
> > Jess uses Integer.parseInt and Double.parseDouble() to parse numbers;
> > when it sees a symbol that starts with a number, it tries to use
> > parseInt, and if that fails, it tries parseDouble, and if that fails,
> > it just leaves it as a symbol.
> >
> > So the syntax is that accepted by these functions; in particular,
> > trailing D and F, as well as scientific notation XeY, are
> > accepted. The manual should be revised to reflect this. Thanks.
> >
> > I think Ryan wrote:
> > > Hello,
> > >
> > > One of my coworkers found an issue when asserting facts. When asserting a
> > > numbers with a D or F ending without quotes results in an asserted decimal
> > > value (see below).  My guess is that D are F are Decimal, Floating
> > > respectively. Anyway, why is this? Are there any other protected
> > > characters I should know about?
> > >
> > > Thanks,
> > > Ryan
> > >
> > >
> > > EXAMPLE------------------
> > > Jess, the Java Expert System Shell
> > > Copyright (C) 1998 E.J. Friedman Hill and the Sandia Corporation
> > > Jess Version 5.2 5/3/2001
> > >
> > > Jess> (assert (numletter 1234560D))
> > > <Fact-0>
> > > Jess> (facts)
> > > f-0   (numletter 1234560.0)
> > > For a total of 1 facts.
> > > Jess> (assert (numletter "1234560D"))
> > > <Fact-1>
> > > Jess> (facts)
> > > f-0   (numletter 1234560.0)
> > > f-1   (numletter "1234560D")
> > > For a total of 2 facts.
> > > Jess> (assert (numletter 1234567F))
> > > <Fact-2>
> > > Jess> (facts)
> > > f-0   (numletter 1234560.0)
> > > f-1   (numletter "1234560D")
> > > f-2   (numletter 1234567.0)
> > > For a total of 3 facts.
> > > Jess> (assert (numletter 1234567Q))
> > > <Fact-3>
> > > Jess> (facts)
> > > f-0   (numletter 1234560.0)
> > > f-1   (numletter "1234560D")
> > > f-2   (numletter 1234567.0)
> > > f-3   (numletter 1234567Q)
> > > For a total of 4 facts.
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> > > in the BODY of a message to [EMAIL PROTECTED], NOT to the
> > > list (use your own address!) List problems? Notify [EMAIL PROTECTED]
> > > ---------------------------------------------------------------------
> > >
> >
> >
> >
> > ---------------------------------------------------------
> > Ernest Friedman-Hill
> > Distributed Systems Research        Phone: (925) 294-2154
> > Sandia National Labs                FAX:   (925) 294-2234
> > Org. 8920, MS 9012                  [EMAIL PROTECTED]
> > PO Box 969                  http://herzberg.ca.sandia.gov
> > Livermore, CA 94550
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> > in the BODY of a message to [EMAIL PROTECTED], NOT to the
> > list (use your own address!) List problems? Notify [EMAIL PROTECTED]
> > ---------------------------------------------------------------------
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> > in the BODY of a message to [EMAIL PROTECTED], NOT to the
> > list (use your own address!) List problems? Notify [EMAIL PROTECTED]
> > ---------------------------------------------------------------------
> >
>
>
>
> ---------------------------------------------------------
> Ernest Friedman-Hill
> Distributed Systems Research        Phone: (925) 294-2154
> Sandia National Labs                FAX:   (925) 294-2234
> Org. 8920, MS 9012                  [EMAIL PROTECTED]
> PO Box 969                  http://herzberg.ca.sandia.gov
> Livermore, CA 94550
>
> ---------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the
> list (use your own address!) List problems? Notify [EMAIL PROTECTED]
> ---------------------------------------------------------------------
>


---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to