help-jel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-jel] Using dotted notation in expressions


From: Konstantin L. Metlov
Subject: Re: [Help-jel] Using dotted notation in expressions
Date: Thu, 15 Aug 2002 19:55:36 +0200 (CEST)

Hello !

Sorry for my silence, I was a little bit distracted by the floods in
Prague...

I still have a problem with the code, since I do not understand clearly --
what you actually want to do. I have modified your files (the changes are
highlighted in the attached diff) to make an expression to correspond to
the gnu.jel.Library initialization you've done, being pretty much sure
that the result is not what you want.

The point is that the methods of the classes supplied to the first two 
arguments of the Library constructur are defined in the _root_ of the 
namespace. Their fields/methods will be accessible without dot operator, 
which is the change described in the attached diff.

In order to use the 'dot' operator you need to either have the root
context containing the fields/methods whose value/return type is a
non-primitive class (on which you would cast the dot operator in an
expression), or, you need to define the "dynamic variables" (see
corresponding section of JEL manual) whose type is a non-primitive class.

Which of the above possibilities to use depends on the answer to the 
following question:

Will the number of root variables change during the program runtime ?

If the set of root variables is fixed, adding them to one of the classes, 
supplied as a first arguments of the Library constructor will provide the 
highest performance. If you plan to add variables during run-time the 
"dynamic variables" will allow such flexibility at a cost of somewhat 
lower performance.

I hope this answers your question, if not -- please ask.

With the best regards,
                        Konstantin.


On Fri, 9 Aug 2002, Prem Lall wrote:

> 
> Hi Konstantin,
> Thanks for your reply.
> As you indicated, I believe problem is related to improper library
> initialization ...
> The easiest thing for me to do is send you my test code so that you could
> tell what I am doing wrong.
> Thanks in advance.
> 
> (See attached file: PTFResult.java)(See attached file: JelTest.java)
> 
> Prem Lall
> BMF E-File Project Team
> 800 North Frederick Road
> Gaithersburg,  MD  20879
> address@hidden
> "The needs of the business outweigh the needs of the few"
> "Pressure turns coal into diamonds"

Attachment: jeltest.diff
Description: jeltest.diff


reply via email to

[Prev in Thread] Current Thread [Next in Thread]