Une classe écrite par un étranger, une si petite application n'est pas nécessaire d'être modulaire à moins qu'il n'y ait des besoins spéciaux.
Utilisez ASP pour générer un nombre aléatoire.
<%
'' ****************************************************************************
'' Classe: Crandom
'' CALLSRANDOMIZETOSEEDTHERDomNumberGenerator.
'' Offre des fonctions pour returnRangeDrandomintegersorArraysof
'' RangedRandomintegers.
'' CallingrandomizetoseedTheRandomNumberGeneratorAthetimeThe
'' Classifié semble être AreasonablethingTodo.
PRIVATESUBCLASS_INITIALIZE ()
'' VérifiertThevBScriptDocumentationforthSpecificSracing
'' Totherandomizefunction
Randomiser
fin
'' Terminé ne fait rien
PRIVATESUBCLASS_TERMINE ()
fin
'' *******************************************************************************************************
'' Fonction: RangedRandom
'' Paramètre: inférieur, thelowestAllowableNumberToreTurn
'' Paramètre: Upperbound, The HighestAllowABLenumberToreTurn
'' Renvoie: Arandomintegerbetweenlowerbound et Upperbound,
''compris
'' *******************************************************************************************************
PublicFonctionRangedRandom (Lowerbound, Upperbound)
RangedRandom = CINT ((Upperbound-Lowerbound) * RND + Lowerbound)
finition de fin
'' *******************************************************************************************************
'' Fonction: RangeDrandomArray
'' Paramètre: inférieur, thelowestAllowableNumberToreTurn
'' Paramètre: Upperbound, The HighestAllowABLenumberToreTurn
'' Paramètre: ArraySize, Numéro zérobé spécifiant TheSize of theArray
'' Paramètre: doublons, trueOrfalsetoidicate
'' ResizizethetEmparraytohoTHenumberOrooSeElements est en train de passer
'' ArraySizeparamètre
redimtemparray (arraySize)
'' ThisAsasaloopCounter, setitto0
FOLMELlements = 0