[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Condor-devel] [Fwd: Re: New Classad difference -- do bools promote to integers?]
- Date: Tue, 17 May 2011 09:59:37 -0700
- From: Erik Erlandson <eerlands@xxxxxxxxxx>
- Subject: Re: [Condor-devel] [Fwd: Re: New Classad difference -- do bools promote to integers?]
On Tue, 2011-05-17 at 11:51 -0500, Dan Bradley wrote:
> More the the point, EvalFloat() doesn't like it if the result is a boolean.
>
> --Dan
So, this is OK:
RANK = (Owner == "coltrane") + (Owner == "tyner")
But this will cause EvalFloat() to choke:
RANK = (Owner == "coltrane")
>
> Dan Bradley wrote:
> >
> > Coercion of bools to integers within expressions is supported in new
> > classads. What I believe is different is that EvalInteger() doesn't
> > like it if the result of the whole expression is a boolean.
> >
> > --Dan
> >
> Erik Erlandson wrote:
> >> It's definitely expected by the documentation, for example:
> >>
> >> RANK = (Owner == "coltrane") + (Owner == "tyner") \
> >> + ((Owner == "garrison") * 10) + (Owner == "jones")
> >>
> >> http://www.cs.wisc.edu/condor/manual/v7.6/3_5Policy_Configuration.html#26839
> >>
>
> _______________________________________________
> Condor-devel mailing list
> Condor-devel@xxxxxxxxxxx
> https://lists.cs.wisc.edu/mailman/listinfo/condor-devel