> From: Philip A. Viton
> 
> I think there may be a problem with the C-escape emulation in sprintf
> (at least on Windows). The following, which embeds explicit  LF's,
> does seem to generate additional space:
> 
> print ('Test',LF,'%J',LF,LF,'Another test\%J',LF) sprintf mz

I think that the use of %J rather %j may be important.

   $'Test\n%j\nAnother test\n%j\n' sprintf mz
18 16
   $('Test',LF,'%j',LF,'Another test',LF,'%j',LF) sprintf mz
18 16
   $'Test\n%J\nAnother test\n%J\n' sprintf mz
235
   $('Test',LF,'%J',LF,'Another test',LF,'%J',LF) sprintf mz
231
   +/ CRLF E. ('Test',LF,'%J',LF,'Another test',LF,'%J',LF) sprintf mz
16
   +/ CRLF E. 'Test\n%J\nAnother test\n%J\n' sprintf mz
20
   +/ CRLF E. ,'Test\n%j\nAnother test\n%j\n' sprintf mz
4

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to