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

Ben Clifford benc at hawaga.org.uk
Mon Jun 25 23:49:51 CDT 2007



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