i really need help with how to add up all the selections with the true statement. I am makeing a cash register and i was told to use the true statement thing well i was wondering what it is that i need to put for the true statement to get it to add up all of the selected true statements
Posted: Tue Apr 01, 2003 3:14 pm Post subject: (No subject)
i am also wondering how i can make it reconize a selection i have it laid out in list form, numbered, and indented. When i use the if statement it does not reconize it.
Posted: Tue Apr 01, 2003 5:00 pm Post subject: (No subject)
you're probably refering to boolean variable. It is used like a flag to mark stuff. For example:
var total:int %counter
var price:int %variable
var tax:boolean %true/false flag for tax
put "enter price"
total := total + price
exit when price =0
put "add tax? y/n"
if word="y" then
tax := true
tax := false
%now you can use that "tax" variable to check what the user selected from before
if tax=true then