I think Ric is onto something here.

If you want to see exactly what is produced, use a. i.

a. i. '\r\lTest\r\l%J\r\lAnother test\r\l%J\r\l' sprintf mz
13 10 84 101 115 116 13 10 13 10 16 26 17 26 17 26 18 13 ...

The version with %j produces a table, which doesn't look like it will 
print right.

Henry Rich


Sherlock, Ric wrote:
>> 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
> 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to