Have you looked at the Format foreign?  8!:n  It won't tell you the leading 0's 
but it might solve your problem in another way?

Cheers, bob

> On Sep 15, 2023, at 12:30, Piet de Jong <pietd...@gmail.com> wrote:
> 
> I was hoping for a verb u that would tell me generally how many zeroes are at 
> the front of eg  0001001 so that I could distinguish it from 1001.
> 
> Thinking about things I want u such that (u y) returns both the y and the 
> number of zeroes fronting y.
> 
> 
> 
>> On 16 Sep 2023, at 04:50, 'robert therriault' via Programming 
>> <programm...@jsoftware.com> wrote:
>> 
>> Is this what you are looking for, Piet?
>> 
>> Cheers, bob
>> 
>>   datatype 01
>> integer
>>  datatype 1
>> boolean
>>  datatype
>> 3 : 0
>> n=. 1 2 4 8 16 32 64 128 1024 2048 4096 8192 16384 32768 65536 131072 262144
>> t=. '/boolean/literal/integer/floating/complex/boxed/extended/rational'
>> t=. t,'/sparse boolean/sparse literal/sparse integer/sparse floating'
>> t=. t,'/sparse complex/sparse boxed/symbol/unicode/unicode4'
>> (n i. 3!:0 y) pick <;._1 t
>> )
>> 
>> 
>>> On Sep 15, 2023, at 11:45, Piet de Jong <pietd...@gmail.com> wrote:
>>> 
>>> Would like a verb u such that  (u 1) does not match (u 01)
>>> Without resorting to character input. 
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>> 
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
> 
> ----------------------------------------------------------------------
> 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