04-27-2006, 06:33 AM
Hi,
In class where supposed to take a simple program from a book and use call statements, I'm having some trouble trying to get QB to complie this program. I know that some of the instructions in the book so far needed to be changed for QB to complie it (Reason being that the book was written for diffent Basic compliers) But I can't figure out why QB doesn't want to complie this code.
In class where supposed to take a simple program from a book and use call statements, I'm having some trouble trying to get QB to complie this program. I know that some of the instructions in the book so far needed to be changed for QB to complie it (Reason being that the book was written for diffent Basic compliers) But I can't figure out why QB doesn't want to complie this code.
Code:
cn = 0 'Customer number
ao = 0 'Amount owed
cl = 0 'Credit limit
fl = 0 'For Loop
mp = 0 'Minimum Payment
cc = 9 'Color
CALL Heading
CALL ACINFO
PROC ACINFO
FOR fl = 1 TO 5
READ cn, ao, cl
mp = ao * .15
IF ao > cl THEN
mp = (ao - cl)
END IF
PRINT TAB(5); cn; TAB(22); ao; TAB(37); cl; TAB(52); mp
cc = cc + 1
COLOR cc
NEXT fl
ENDPROC
PROC Heading
CLS
COLOR 12
PRINT TAB(3); "CUSTOMER NO."; TAB(19); "AMOUNT OWED"; TAB(35); "CREDIT LIMIT"; TAB(52); "Minimum Payment"
COLOR 9
ENDPROC
'DATA
DATA 1003,1257.62,1000
DATA 1105,326.35,1500
DATA 1261,907.15,800
DATA 2157,862.18,3000
DATA 2501,1232.53,2000