Re: [classad-users] eval method


Date: Fri, 28 Jun 2002 04:53:12 -0500 (CDT)
From: Giuseppe Avellino <giuseppe.avellino@xxxxxxxxxx>
Subject: Re: [classad-users] eval method
Nicholas Coleman wrote:
> 
> If you want to test out function call expressions you should use the
> following method:
> 
> public static Expr eval(RecordExpr ad, String[] attrs)
> 
> Where ad is the ClassAd that you have inserted and attrs is an array
> containing the name of the attribute to be evaluated.
> 
> In your case you would call:
> 
> Expr e = eval( ad, {pippo} );
> 
> The reason that attrs is an array is that you might want to evaluate
> attributes in nested classads.
> 
> If you want information about the parameters and return values of the
> ClassAd functions in Java you should look at the source code for FuncCall
> (FuncCall.java).  In case you don't have the source, here is an excerpt
> containing all Java ClassAd functions (note that not all of the C++
> functions are implemented in the java version,some have different
> names, and some functions only exist in the Java version):
> 
> /* string operations */
> "strcat",       // varags; apply string() to each arg first
> "substr",       // substr(stringval,offset,length)
> "strcmp",       // lex compare, return < = > 0
> "stricmp",      // like strcmp, but convert to lower case first
> "glob", // "glob" style matching with * and ?
> "iglob",        // like glob, but lower case in pattern matches either case
> 
> /* data conversion */
> "int",  // convert arg to int (truc reals, parse strings)
> "real", // convert arg to real (parse strings)
> "string",       // convert arg to string
> 
> /* real to int (first apply real() if necessary) */
> "floor",        // greatest int <= value
> "ceiling",      // smallest int >= value
> "round",        // nearest int (IEEE rules)
> 
> /* time/date functions */
> "unixTime",     // no args; seconds since 1/1/1970, gmt
> "timeInterval", // convert to days+hh:mm:ss
> "localTimeString",      // Unix ctime format
> "gmtTimeString" // Unix ctime format
> 
> - Nick
> 
> 
> Condor Classads Info:
> http://www.cs.wisc.edu/condor/classad/
I thank you very much. This will help me.
You talked about the source code, it could be very usefull for me, do
you think you can e-mail it to me as attachment? or you know a link I
can download it from? (remember I am talking about Java classes source
code).
thanx

-- 
Giuseppe Avellino
GRID R&D Group
Defence, Space & Environment Division

DATAMAT S.p.A.
Via Laurentina, 760 - I - 00143 Rome - Italy
http://www.datamat.it

mailto:giuseppe.avellino@xxxxxxxxxx
Phone: +39 06 5027 4587 (direct) +39 06 5027 4570 (secretary)
Fax:   +39 06 5027 4500
Condor Classads Info:
http://www.cs.wisc.edu/condor/classad/




[← Prev in Thread] Current Thread [Next in Thread→]