At 03:44 PM 1/18/2006 -0600, Marvin Solomon wrote:
Alain Roy wrote:
> You're mixing syntax for old and new ClassAds, but yes. In new
> ClassAds, you can write:
>
> Requirements = A isnt defined && B is undefined;
I think you meant
Requirements = other.A isnt undefined && other.B is undefined;
Oops, you're right.
Better still, how about a function atributes(Expr) that returns all the
attribute names as a list of strings? You could use the existing function
size() to find out how many.
Requirements = other.A isnt undefined && size(attributes(other)) == 1;
Better yet, we can use:
Requirements = other.A isnt undefined and size(other) == 1
We already defined size() for a ClassAd to return the number of
attributes, and it's implemented in the C++ version for sure. I had
simply forgotten we did this.
-alain
|