Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

initialize

Status
Not open for further replies.

ChrisRJ

Programmer
Mar 20, 2003
3
0
0
US
Does any really know how this Function works? I was under the impression that it resets certain variables. Every time i write a variable within the parenthesis, to rest it, it doesn’t work! For example, i am tracking right and wrong answers for a group of interaction and displaying the score at the end with percentcorrect. Problem is, it calculates the score for all the interactions as one score. So to track the scores of the interactions independently, i placed a cal icon before the second group of interactions and wrote Initialize (PercentCorrect) inside it, to no avail! Was this the right way to approach it or should i have done it differently? Also, what is the right way to use to "initialize" function?
Thanks a million!
 
PercentCorrect is a system variable that actually uses the system variables TotalWrong and TotalCorrect. If you do:

Code:
Initialize(TotalCorrect)
Initialize(TotalWrong)

wherever you want it to reset, it should behave the way you'd expect. Obviously you may want to save the current value before you initialize it if you want to continue to track it:
Code:
SectionOneScore:=PercentCorrect
Initialize(TotalCorrect)
Initialize(TotalWrong)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top