Or you can apply interger and float-ifying operations

   3!:0 ] 0.0
1
   3!:0 ] 0%1   NB. val%1
8
   3!:0 ] 0+0   NB. val+0
4
   

--- Roger Hui <[EMAIL PROTECTED]> wrote:

> You can code floating point 0 and 1 as -~0.1 and %~0.1.
>    d0=: -~0.1
>    d1=: %~0.1
> 
> 
> 
> ----- Original Message -----
> From: Yuvaraj Athur Raghuvir <[EMAIL PROTECTED]>
> Date: Tuesday, January 1, 2008 22:29
> Subject: [Jprogramming] Controlling implicit conversions?
> To: Programming forum <[email protected]>
> 
> > Hello,
> > 
> > I see the following behaviour:
> > 
> >    3!:0 (a =. 0.0)
> > 1
> >    3!:0 (a =. 1.0)
> > 1
> >    3!:0 (a =. 2.0)
> > 4
> >    3!:0 (a =. 2.1)
> > 8
> > 
> > 
> > >From this I understand that J converts implicitly before the 
> > assignment.
> > I want to retain 0.0 & 1.0 as floats with copula(=. or =:). How 
> > can I do so?
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 



      
____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to