* BAL.CMD
* M. LYNN
* Version 1.6
ERASE

IF file = '1' 
STORE startper TO startbal
ELSE 
STORE startbus TO startbal
ENDIF 

GO TOP
DO WHILE .NOT. EOF

IF number = 0 .AND. to = 'DEPOSIT' .OR. to = 'INTEREST PAYMENT'
STORE startbal + amount TO startbal
ELSE
STORE startbal - amount TO startbal
ENDIF

SKIP

ENDDO

IF file = '1' 
STORE startbal TO perbal
ELSE 
STORE startbal TO busbal
ENDIF 
SET INTENSITY OFF
@ 9, 0 SAY 'The current balance is: '
@ 9, 26 SAY startbal
RELEASE startbal
SAVE TO INFO
SET INTENSITY ON
@ 22, 0 SAY 'PRESS ANY KEY TO CONTINUE'
SET CONSOLE OFF
WAIT 
SET CONSOLE ON
RETURN
t