Jaap, Your program reads correctly the following file: $optics npoints = 151 mesh = 0.0003836 lambda = 4e-05 nslices = 1 scriptfile = "optics.tmp.script" infile = "gaussian.dfloptics.tmp.in" outfile = "optics.tmp.dfl" M = 1 $end i.e., quoted strings. Cheers Dominique