GetNumber
The GetNumber function opens a dialog to request a number. If you click[OK] , the entered number is returned.
|
|
number, bSuccess = GetNumber()
number, bSuccess = GetNumber( n )
number, bSuccess = GetNumber( n, sPrompt )
number, bSuccess = GetNumber( n, sPrompt, sTitle )
where
n is the initial value of the number. If nil, 0 is used.
sPrompt is the message above the number field. If nil, a default is used.
sTitle is the window title. If nil, a default is used.
bSuccess is an optional success flag. If[OK] is clicked, the function returns the number andbOk=true. If the dialog is canceled,0,false is returned.
All arguments are optional and assume default values beyond the last argument you specify. To use a default argument but follow it with a specified argument, use a nil in its place..
The window shown above was created using the following code. Note that the last argument, the window title, was omitted and left to the default:
|
|