<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Fri, 05 Nov 2010 18:22:44 +0000
From   : jgh@... (J.G.Harston)
Subject: Programming: Sigsumeidsi

Farlie A wrote:
> id - &1
> bi - &2
> tet - &4
> oct- &8
> hex- &10
> it - is used as base 16 left shift operator.
> se- (symbol end) - I've added this given an ambiguity that arose in the
> previous thread, It's is however sometimes ommited.
> nul -   zero

       DEFFNsignum(A%):IFA%=0:="nul"
        
=LEFT$("tetit",(A%AND128)<>0)+LEFT$("biit",(A%AND64)<>0)+LEFT$("idit",(A%AND32)<>0)+LEFT$("hex",(A%AND16)<>0)+LEFT$("oct",(A%AND8)<>0)+LEFT$("tet",(A%AND4)<>0)+LEFT$("bi",(A%AND2)<>0)+LEFT$("id",(A%AND1)<>0)+"se"

Demoed with:
       FOR A%=0 TO 255
         PRINTA%;" ";FNsignum(A%)
       NEXT

-- 
J.G.Harston - jgh@...     
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>