Glad that you have fixed the bug. A simpler script to demonstate the bug is

p=. mema 5
(4{.'abcde') memw p,0 5 2
echo memr p,0 5 2

it echo abcde but it shoud be abcd\0


> On 27 Feb 2022, at 11:34 PM, Henry Rich <[email protected]> wrote:
> 
> Thanks.  I have fixed the code (which looked like it was copying an extra 
> garbage atom from the string instead of appending 0, just as you surmised).  
> I also updated NuVoc to describe what the functions actually do.
> 
> Henry Rich
> 
> On 2/27/2022 10:08 AM, Raul Miller wrote:
>> https://code.jsoftware.com/wiki/Vocabulary/Foreigns#m15
>> 
>> includes the text:
>> 
>> "count must equal the number of atoms in (,x), except that if
>> precision=2, count may be one more, to cause a zero byte to be
>> appended."
>> 
>> But by inspection we can see that a zero byte is not being appended.
>> 
>> Thanks,
>> 
> 
> 
> -- 
> This email has been checked for viruses by AVG.
> https://www.avg.com
> 
> ----------------------------------------------------------------------
> 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