ÿþ/ /   C r e a t e d   b y :   M a n z i   O l i v i e r   : :   h t t p : / / w w w . i m a n z i . c o m /  
  
 / /   c a l c u l a t e   t h e   A S C I I   c o d e   o f   t h e   g i v e n   c h a r a c t e r  
 f u n c t i o n   C a l c K e y C o d e ( a C h a r )   {  
     v a r   c h a r a c t e r   =   a C h a r . s u b s t r i n g ( 0 , 1 ) ;  
     v a r   c o d e   =   a C h a r . c h a r C o d e A t ( 0 ) ;  
     r e t u r n   c o d e ;  
 }  
  
 f u n c t i o n   c h e c k N u m b e r ( v a l )   {  
     v a r   s t r P a s s   =   v a l . v a l u e ;  
     v a r   s t r L e n g t h   =   s t r P a s s . l e n g t h ;  
     v a r   l c h a r   =   v a l . v a l u e . c h a r A t ( ( s t r L e n g t h )   -   1 ) ;  
     v a r   c C o d e   =   C a l c K e y C o d e ( l c h a r ) ;  
  
     / *   C h e c k   i f   t h e   k e y e d   i n   c h a r a c t e r   i s   a   n u m b e r  
           d o   y o u   w a n t   a l p h a b e t i c   U P P E R C A S E   o n l y   ?  
           o r   l o w e r   c a s e   o n l y   j u s t   c h e c k   t h e i r   r e s p e c t i v e  
           c o d e s   a n d   r e p l a c e   t h e   4 8   a n d   5 7   * /  
  
     i f   ( c C o d e   <   4 8   | |   c C o d e   >   5 7   )   {  
         v a r   m y N u m b e r   =   v a l . v a l u e . s u b s t r i n g ( 0 ,   ( s t r L e n g t h )   -   1 ) ;  
         v a l . v a l u e   =   m y N u m b e r ;  
     }  
     r e t u r n   f a l s e ;  
 } 
