delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/08/08:26:27

Sender: mckee AT rtp DOT gtegsc DOT com
Message-ID: <334A38EA.5760@rtp.gtegsc.com>
Date: Tue, 08 Apr 1997 08:24:10 -0400
From: David McKee <david DOT mckee AT rtp DOT gtegsc DOT com>
Organization: GTE (My views are my own)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Gawk doesn't like close...
References: <Pine DOT SUN DOT 3 DOT 91 DOT 970408135036 DOT 1046D-100000 AT is>

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019