Jump to content

Kernighans large earthquake problem: Difference between revisions

Emacs Lisp: Avoid need non-portable shebang
m (→‎{{header|Phix}}: added syntax colouring, made p2js compatible)
(Emacs Lisp: Avoid need non-portable shebang)
Line 1,025:
 
=={{header|Emacs Lisp}}==
<lang lisp>#!/usr/bin/env emacs (with-temp-scriptbuffer
(insert-file-contents "data.txt")
 
(goto-char (point-min))
(dolist (arg command-line-args-left)
(find-file arg)
(while (not (eobp))
(let* ((line (buffer-substring (line-beginning-position)
Line 1,035 ⟶ 1,034:
(when (> (string-to-number magn) 6.0)
(message line)))
(forward-line 1))))</lang>
 
=={{header|Factor}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.