in reply to Optimization of a piece of code(Is there a better way than this?)

Could you explain how these statements
$Max_Questions = $Total_Questions; &_set_Max_Questions($self,$Max_Questions);
differ? The second looks odd. I would expect it to read   $self->_set_Max_Questions($Total_Questions); unless you're depending later on have $Max_Questions defined. Seeing it written as is, I'm left with the suspicion that there's some odd stuff going on elsewhere.

Replies are listed 'Best First'.
Re: Re: Optimization of a piece of code(Is there a better way than this?)
by TStanley (Canon) on Jul 03, 2002 at 19:45 UTC
    The _set_Max_Questions function sets a parameter within the object that contains the number of questions that will be asked in the test. The $Total_Questions variable is the total number of questions that are in the question file that was passed when creating the actual object.

    TStanley
    --------
    Never underestimate the power of very stupid people in large groups -- Anonymous