You are setting Gamma_Num to dat$(15). dat$(15) = "gamma=0.5" so converting the string "gamma=0.5" to a number may give you wierd results. You really should set Gamma_Num to equal only the numeral part of dat$(15). To do this you will need to subtract the beginning of the string from it.
Something like: dat$(15) = right$(dat$(15), Len(dat$(15) - 6)
BTW, I'm at work, so if I didnt' write that line correctly, you'll have to figure it out.
Something like: dat$(15) = right$(dat$(15), Len(dat$(15) - 6)
BTW, I'm at work, so if I didnt' write that line correctly, you'll have to figure it out.