[Swift-user] Could not convert value to number: true

Luciano Piccoli piccoli at fnal.gov
Tue Jun 26 20:25:27 CDT 2007


Thank you for the clarification.

My goal in using the csv_mapper was to extract out the from the swift 
script all hardcoded physics parameters, so that the same swift file 
could be reused on different configurations without changes.

A second option is to pass all the parameters via the command line, 
which I wanted to avoid. Well, the actual swift command line can be 
wrapped in a shell script so the end user does not have to deal with all 
the parameters.

Are there - or will there be - other ways to pass parameters to a swift 
script? For example, if these parameters are kept in a database, could 
they be accessed via a database mapper? Yong mentioned plans about a 
database mapper last time he came to FNAL.

Thanks,
Luciano


Ben Clifford wrote:
> On Mon, 25 Jun 2007, Luciano Piccoli wrote:
>
>   
>> Does the variable age gets read from the file at the first line? Is it an
>> integer at that point or is it still a reference to the file?
>>     
>
> The content of the file is never read into Swift itself. Swift will track 
> files so that when you run an app block, you can refer to files there 
> using the @filename construct (or equivalently, @ shorthand). 
>
> So in:
>
>   
>> (messagefile t) sayAge(int age) {                                               
>>   app {                                                                        
>>       echo "Age: " @age stdout=@filename(t);                                   
>>   }                                                                            
>> }                                            
>>     
>
> @age and @filename(t) will evaluate to the filename of the 'age' or 't' 
> datafiles.
>
> If swift decides to run 'echo' on a different machine it will move those 
> files to/from that remote machine and ensure that @age and @filename(t) 
> evaluate to the appropriate remote filenames.
>
> But it won't read the contents of those files into a variable for 
> evaluation.
>
>   




More information about the Swift-user mailing list