Return TypeFunction nameArguments
voidSpeakNumber(hzChain&,int,)

Declared in file: hzTextproc.h
Defined in file : hzTextproc.cpp

Function Logic:

0:START 1:nValue<0 2:items nValue 3:B M T U 4:B 5:nValue _speakno 6:nValue 7:items 8:items 9: No text 10:M 11:nValue _speakno 12:nValue 13:items 14:items 15: No text 16:T 17:nValue _speakno 18:nValue 19:items 20:items 21: No text 22:U 23:_speakno 24: No text

Function body:

void SpeakNumber (hzChain& Z, int nValue)
{
   _hzfunc("SpeakNumber") ;
   hzString    v ;
   int32_t     B ;
   int32_t     M ;
   int32_t     T ;
   int32_t     U ;
   if (nValue < 0)
   {
       Z << "Minus " ;
       nValue *= -1;
   }
   B = (nValue / 1000000000);
   M = (nValue % 1000000000)/1000000;
   T = (nValue % 1000000)/1000;
   U = (nValue % 1000);
   if (B)
   {
       nValue -= (B * 1000000000);
       _speakno(Z, B) ;
       if (nValue)
           Z << " billion, " ;
       else
       {
           Z << " billion" ;
           return ;
       }
   }
   if (M)
   {
       nValue -= (M * 1000000);
       _speakno(Z, M) ;
       if (nValue)
           Z << " million, " ;
       else
       {
           Z << " million" ;
           return ;
       }
   }
   if (T)
   {
       nValue -= (T * 1000000);
       _speakno(Z, T) ;
       if (nValue)
           Z << " thousand and " ;
       else
       {
           Z << " thousand" ;
           return ;
       }
   }
   if (U)
       _speakno(Z, U) ;
}