(# File: integerIn.m
 #
 # 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 <stdlib.h>

MODEL integerIn

    stream parameter file;
    integer output y;
    char in[255];

INITIALIZE

    rewind (file);
    Enable();

EXECUTE

    if (fscanf(file, "%s\n", in) < 0) return;

    y = atol(in);

    ContinueSimulation();
    Enable();

END
