From: J L. T. <jlt...@ma...> - 2022-06-19 08:12:27
|
Hi, I've written a little routine to replace plain quotes and apostrophes (' ") with the curly variety (‘ ’ “ ”) but I'm having fun getting it to compile. Chapter 16.2 of the NetRexx Programming Guide shows this example: | loop i=1 while lines('testdata.txt') > 0 | say i linein('testdata.txt') | end but when I compile fixQuotes.njp (attached) the compiler says it can't find both lines() and lineIn() methods (see attached fixQuotes.streamIOfail). I tried replacing the loop with the Address command, but | address bash 'cat' progName'.help' fails, complaining of a missing 'with' clause (see fixQuotes.addressFail). It appears that Address expects either a simple variable or a literal here, but in any case, the with clause is supposed to be optional (Language Reference, pg 60)? I didn't want to use the stream I/O paradigm for creating a backup of the file to be processed, so I tried the example shown in Core Java Volume II 11th Ed. by Cay S. Horstmann, pgs.114, 115: | Files.copy(fromPath, toPath, StandardCopyOption.REPLACE_EXISTING, | StandardCopyOption.COPY_ATTRIBUTES) The document says this method is provided by java.nio.file.Files, but pipc complains about the StandardCopyOptions clauses (see fixQuotes.FileCopyFail), though I added | include java.nio. in my source. Suggestions for workarounds are welcome. :-) Leslie -- Operating System: Linux Distribution: openSUSE Leap 15.4 x86_64 java version "18" 2022-03-22 NetRexx portable processor 4.03-GA build 260-20220503-1730 |