PlayerOneName = GetValidPlayerName() ; PlayerTwoName = GetValidPlayerName() ; BowlDieResult = RollBowlDie(VirtualDiceGame) ; AppealDieResult = RollAppealDie(VirtualDiceGame). Make sure that you include the = as a function call will always return a value
Write down a procedure declaration used in the program
A:
Sub ResetTopScores(ByRef TopScores() As TTopScore)
VirtualDiceGame, BowlDieResult, RunsScored, CurrentPlayerScore, etc.
Explain the difference between using byRef and byVal
A:
byRef refers to the original value that is passed to the sub routine, and any changes made to the value inside the subroutine are applied directly to the original value as well, byVal copies the value into another variable inside the subroutine and any changes made to this value are not made to the original
Why is Byref used in the ResetTopScores sub routine?
A:
the routine wants to reset the Top Scores, as the top scores are not a global variable we use byRef to refer to the original value and any changes made to TopScores are made directly to the TopScores array
Write down where a return value for a function is assigned: