Mail Archives: djgpp/1997/04/08/08:26:27
Eli Zaretskii wrote:
>
> On Mon, 7 Apr 1997, David McKee wrote:
>
> > I am attempting to use a Nawk script originally developed on
> > a unix machine (SunOS) under Gawk. It barfs when it gets to the
> > "Close <file>" argument. Any ideas from any gawk users out
> > there would be apprecited. I am using the latest version of
> > gawk.
>
> Please post the shortest version of the script that exhibits the
> problem.
Thanks Eli, your responses are highly prized (by me)...
The code fragment:
function scanBoilerPlate(bpFile) {
#--/ Scan and Process the boiler plate file
bpNumLines = 0
rbNumLines = 0
rBlockNum = 0
while (getline < bpFile > 0) #--/ read boiler plate
{
.
.
.
} #--/ End While
close bpFile #--/ Close Boiler Plate !!! HERE IS WHERE GAWK DIES.
$0 = "" #--/ Empty Line Buffer
} #--/ End scanBoilerPlate
This is a large Nawk script that takes a boilerplate file and based
on tokens found inside, reads from a "live text file" or queries the
user for input, or both to crete such things as a fully commented
header file with class skeletons, etc.
-- David T. McKee:
-- Think: Innovative Science Learning Systems
-- Physics, Electrical Science, Computer
-- Science, Natural Science, Theology
======================Signature Block====================
It is the glory of God to conceal a matter; To search out
a matter is the glory of kings. Pr 25:2
---------------------------------------------------------
There is nothing so sacred as it cannot be looked into...
=========================================================
- Raw text -