Re: [classad-users] string concatenation


Date: Mon, 20 Sep 2004 12:19:08 -0500 (CDT)
From: Maraska <alessandro.maraschini@xxxxxxxxxx>
Subject: Re: [classad-users] string concatenation
Hi,
thank you for your support.
We're currently developing a utility that takes as input a simple parametrized
classad and builds and returns a dagad instead.
The Idea is that the user declares a job like as usual, but one or
more attribute's value can refer to a particular attribute that can have
different values
The definitive syntax of how to use those parameters is not yet defined.
We were thinking about using a reserved word to specify the possible values
to iterate over , such as:
_possible_values_ = {   "firstValue" , "secondValue" , "3"
, "SomeStringValue"  } ;
and then refer to it by another reserved word :
Executable = "/home/user/bin/foo" ;
InputSandbox = { _value_  , "anotherFixedValue" ,  executable
};
StdInput = _value_ ;
 
Eventually  iterating over the _possible_values_ list a
dag with empty {} dependencies is created.
Each node contains a Job whose description is resolved, i.e. 
whose attributes does not refers anymore to  _value_
At the beginning we were thinking to completely adopt the classads
library; but then we've changed our mind and we're tending now to an approch
like the C pre-processing evaluation, i.e.  a string replacement is
done before creating the classad:
possible values can be of any kind:
_possible_values_ = {   firstValue , secondValue , 3 ,   
true , "SomeStringValue"  } ;
and then it's up to the user whether to consider the value as a simple
string:
InputSandbox = "_value_" ;
as a concatenated string: (we decided that the strcat wasn't that simple
from the user point of view)
StdInput = "file_value_.in" ;
or whatever:
AnyKindOfExpression= _value_ ;
 
 
cheers,
Alessandro
 
 
 
Joe Nelson wrote:
> The reason is that we're trying to provide to the
user the possibility to
> parametrise its jobs. In other words we would like to manage a classad
like:
>
> values={ "1" , "2" , "2bis" ........   , "last" } ;
> input ="input" + values[ i ]  ;
> output = "output" + values[ i ] ;
>
> and then generate n classad iterating over the values.
> thank you,
As Alain mentioned, the strcat function will concatenate the strings.
I'm
curious about the second part of the problem: generating a classad
iterating
over the values. Can you describe this part?
--Joe Nelson
Condor Classads Info:
http://www.cs.wisc.edu/condor/classad/



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