; DENUM
;
; Program for Proteus
;
; (C) 2003-2004 Simone Zanella Productions
;
; Remove all line numbers from source file, writing result to destination.
; Source file must be a BASIC file with line numbers.
#!proteus -z
IF LT(ARGC, 6)
CONSOLELN "Syntax: " ARGV(1) " " ARGV(2) " source destination"
CONSOLELN ""
CONSOLELN "Purpose: remove line numbers from source file, writing result"
CONSOLELN "to destination."
ABORT 0
FI
H = FOPEN(ARGV(5), 1)
D = FOPEN(ARGV(6), 28)
WHILE NOT(FEOF(H))
L = FREADLN(H)
IF ISDIGIT(TOKEN(L, 1, " "))
FWRITELN(D, RESTFROM(L, POSTOKEN(L, 2, " ")))
ELSE
FWRITELN(D, L)
FI
LOOP
FCLOSE(H)
FCLOSE(D)
ABORT 0