Lanterns may also be used for signaling. In naval operations, ships used lights to communicate at least as far back as the Middle Ages; the use of a lantern that blinks code to transmit a message dates to the mid-1800s. In railroad operations, lanterns have multiple uses. Permanent lanterns on poles are used to signal trains about the operational status of the track ahead, sometimes with color gels in front of the light to signify stop, etc. Historically, a flagman at a level crossing used a lantern to stop cars and other vehicular traffic before a train arrived. Lanterns also provided a means to signal from train-to-train or from station-to-train.