I guess it has to be the need for a NUL terminating a c-string.

But now what is the 38 in the following:

      hexdump 3!:1 (<'test'),<'abcd'
00  E1 00 00 00-20 00 00 00  02 00 00 00-01 00 00 00  &#9474;... 
.........&#9474;
10  02 00 00 00-1C 00 00 00  38 00 00 00-E1 00 00 00  
&#9474;......8......&#9474;
20  02 00 00 00-04 00 00 00  01 00 00 00-04 00 00 00  
&#9474;............&#9474;
30  74 65 73 74-00 00 00 00  E1 00 00 00-02 00 00 00  
&#9474;test..........&#9474;
40  04 00 00 00-01 00 00 00  04 00 00 00-61 62 63 64  
&#9474;.........abcd&#9474;
50  00 00 00 00                                       &#9474;....            
&#9474;

I am trying to use the Simple Socket Server class from a non-J 
environment. Since this class rests on 3!:1 and it is preferable 
to use it as it is, I need to emulate 3!:1. Having a model in J 
would help.

The Simple Socket Client/Server classes and the related lab 
are clear and simple. Thanks, Eric!

Gilles

---------- Original Message -----------
From: "Gilles Kirouac" <[EMAIL PROTECTED]>
To: Beta forum <[email protected]>
Sent: Mon, 14 Aug 2006 02:08:17 -0400
Subject: [Jbeta] 3!:1 and 3!:3 What are these zeros?

> Are the terminating zeros padding? 
> When are four zeros added?
> The terminating byte should be a zero 
> padded to the full word: is this the rule?
> I do not see those zeros mentioned in the doc.
> 
>       3!:3 '123'
> e1000000
> 02000000
> 03000000
> 01000000
> 03000000
> 31323300
>       3!:3 '1234'
> e1000000
> 02000000
> 04000000
> 01000000
> 04000000
> 31323334
> 00000000
>       3!:3 '12345'
> e1000000
> 02000000
> 05000000
> 01000000
> 05000000
> 31323334
> 35000000
>       3!:3 '12345678'
> e1000000
> 02000000
> 08000000
> 01000000
> 08000000
> 31323334
> 35363738
> 00000000
> 
> Gilles
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
------- End of Original Message -------

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

Reply via email to