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

Luciano Piccoli piccoli at fnal.gov
Mon Jun 25 21:53:15 CDT 2007


Hi,

I am getting the following error when running the swift script below:

    bash-3.00$ swift -dryrun age.swift -tc.file tc.data
    Swift V 0.0405
    RunID: phvopumbeee40
    Execution failed:
            org.globus.cog.karajan.workflow.KarajanRuntimeException: 
Could not convert value to number: true

Is the multiplication an invalid operation in this case?
Thanks,
Luciano

---- age.swift ----
type student { 
    string name; 
    int    age; 
    float  GPA;
} 

type messagefile {}

(messagefile t) sayAge(int age) {
    app {
        echo "Age: " @age stdout=@filename(t);
    }
}

student p[]<csv_mapper;file="student.txt">;

messagefile outfile <"age.txt">;

int age = p[0].age * 4;

outfile = sayAge(age);
------------------

---- student.txt ---
name age GPA
Aaaa 23 3.1415
Bbbb 12 2.7212
Cccc 25 4.456
-------------------



More information about the Swift-user mailing list