' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '  
 '   ! E x D i a l o g . v b s  
 ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '  
  
 '   I n i t i a l i z e   a l p h a n u m e r i c   I / O   d i a l o g  
 I n i t D i a l o g  
 N a m e D i a l o g   " ! E x D i a l o g "  
 S h o w D i a l o g  
  
 '   G e t   i n p u t  
 a   =   I n p u t ( " F a c t o r i a l   o f   [ 1 0 ] : " , " 1 0 " )  
  
 '   C a l c u l a t e   f a c t o r i a l  
 f   =   1  
 F o r   i = 1   T o   C L n g ( a )  
       f   =   f   *   i  
       S t a t u s   C S t r ( f )  
       S l e e p   1 0 0  
       I f   D o E v e n t s ( )   =   " $ S T O P "   T h e n  
             S t a t u s   " S c r i p t   s t o p p e d "  
             E x i t   F o r  
       E n d   I f  
 N e x t  
  
 '   P r i n t   r e s u l t  
 S t a t u s   " D o n e "  
 P r i n t   " F a c t o r i a l   o f   "   &   a   &   "   i s   "   &   v b C r L f  
 P r i n t   C S t r ( f )  
  
 