Hello Guest it is April 26, 2024, 08:18:57 AM

Author Topic: Input Box Function  (Read 3572 times)

0 Members and 1 Guest are viewing this topic.

Offline Greolt

*
  •  956 956
    • View Profile
Input Box Function
« on: March 29, 2009, 12:58:33 AM »
I found this on the Cypress Enable Language document.

Sub Main ()
  Title$ = "Box to ask for a number"
  Prompt$ = "Enter the number"
  Default$ = ""
  X% = 200
  Y% = 200
  N$ = InputBox$(Prompt$, Title$, Default$, X%, Y%)
End Sub 

When this Input Box is run where is the answer?

How do I retrieve it?   Where is it stored?  In a parameter?  I am looking for an integer.

I hope that makes sense.  I don't even know enough to ask the right question.   ;)

Greg

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Input Box Function
« Reply #1 on: March 29, 2009, 10:31:11 AM »
N$  is the string that the user types in.

The type that N$ is a string, if you want it to be a number you will need to use a string to int or decimal or float function from the book.

scott
fun times

Offline Greolt

*
  •  956 956
    • View Profile
Re: Input Box Function
« Reply #2 on: March 30, 2009, 07:07:07 PM »
Thanks Scott

It was fairly obvious once I saw it.  Usually is isn't it.  ;D


Dim P583 As Integer

Title$ = "Box to ask for a number"
Prompt$ = "Enter the number"
Default$ = ""
X% = 200
Y% = 200
P583 = InputBox$(Prompt$, Title$, Default$, X%, Y%)

Greg