In Vala you can do:
public void main() {
float foutvalue = 5.55;
{ //Need to make vala close the output file!
var output = FileStream.open("floatfile","w");
output.printf("%f", foutvalue);
}
float finvalue = 0.0;
{
var input = FileStream.open("floatfile", "r");
input.scanf("%f", out finvalue);
}
print(@"$finvalue\n");
}