(# File: doubleIn.m # # Brian Brandt - 15-Oct-1990 # Sha Rabii 22-Jan-1997 # Sha Rabii 15-Oct-1997, added initialize statements to allow re-reading # of the file when a FOR statement is used. #) #include MODEL doubleIn stream parameter file; double output y; char in[255]; INITIALIZE rewind (file); Enable(); EXECUTE if (fscanf(file, "%s\n", in) < 0) return; y = atof(in); ContinueSimulation(); Enable(); END