You can't depend on function parameters being evaluated in any particular order...
DoSomething f(x), g(x)
might call g before or f. Or maybe not.
This means you need to replace
temp_vertex=AddVertex(temp_surface,ReadFloat(file),ReadFloat(file),ReadFloat(file))
with
x# = ReadFloat(file)
y# = ReadFloat(file)
z# = ReadFloat(file)
temp_vertex = AddVertex temp_surface, x,y,z
DoSomething f(x), g(x)
might call g before or f. Or maybe not.
This means you need to replace
temp_vertex=AddVertex(temp_surface,ReadFloat(file),ReadFloat(file),ReadFloat(file))
with
x# = ReadFloat(file)
y# = ReadFloat(file)
z# = ReadFloat(file)
temp_vertex = AddVertex temp_surface, x,y,z