Kernighans large earthquake problem: Difference between revisions

Add SNOBOL
(Add 8080 assembly)
(Add SNOBOL)
Line 1,372:
.map(_.mkString("\t"))
.foreach(println)</lang>
 
=={{header|Snobol}}==
 
This is hard-coded to read the input from "data.txt".
 
<lang snobol> input(.quake, 1,, 'data.txt') :f(err)
num = '.0123456789'
 
line test = quake :f(end)
test span(num) . magnitude rpos(0) :f(line)
output = gt(magnitude,6) test :(line)
 
err output = 'Error!'
end</lang>
 
{{output}}
 
<pre>$ cat data.txt
8/27/1883 Krakatoa 8.8
5/18/1980 MountStHelens 7.6
3/13/2009 CostaRica 5.1
1/23/4567 EdgeCase1 6
1/24/4567 EdgeCase2 6.0
1/25/4567 EdgeCase3 6.1
$ snobol4 quakes.sno
8/27/1883 Krakatoa 8.8
5/18/1980 MountStHelens 7.6
1/25/4567 EdgeCase3 6.1</pre>
 
=={{header|Swift}}==
2,093

edits