 |
THE HYPERCARD CENTER |
|
|
Note: This is a work in progress and many formatting issues have been fixed. Read more about the project on the home page.
randomthe random of posInteger
Value returned: a random integer between 1 and posInteger Random returns values for integers up to 2^31 - 2 .
Demo Scripton hyperMath -- This is a very simple math flash card script. put random(50) into intOne put random(50) into intTwo put item random(2) of "+,-" into theOperator put intOne && theOperator && intTwo && "=" && ¬ (the value of (intOne && theOperator && intTwo)) into theAnswer put 0 into theCount ask "What is" && intOne && theOperator && intTwo if it is empty then exit hyperMath if it is last word of theAnswer then put "That's right!" & ¬ return before theAnswer answer theAnswer end hyperMath
Placeholders
posIntegerAn expression that evaluates to a positive integer. For example: 3 67 mod 13 the number of bg fields the number of backgrounds the number of cards div 2
See also: background , bkgnd , button , card , chunk , field , menu , and menuItem
HyperTalk Reference
|