Hi Scott,
You may try Do Case statements as follows:
Dim city, msg As String
Do Case city
Case toronto
save copy C:\Toronto.tab as E:temp\toronto.tab
Case Chicago
save copy C:\Toronto.tab as E:temp\Chicago.tab
Case xyz
save copy C:\xyz.tab as E:temp\xyz.tab
Case Else
msg = "city is not in the database?"
End Case
Regards,
Khairul Alam
ECOWISE Environmental, Canberra, Australia
ph: 6270 7655
>IF CITY = toronto then
>else if city = then
>
At 05:35 pm 18/10/1999 -0600, you wrote:
> Hello all,
>
>I am relatively new to mapbasic and programming in general.
>
>In the program I am working on
>I have created a pulldown menu which list various cities
>
>ie
>
>Toronto
>Chicago
>Vancouver
>Los Angeles etc
>
>once the user has selected the city he wants and clicked the okay button
>the city would be placed into a input variable ie
>CITY
>
>I would like to
>have one sub routine such as
>
>save copy C:\city.tab as E:\temp\city.tab
>in which the input variable city would represent the variable that the user
>has selected
>
>rather than doing
>
>this
>IF CITY = toronto then
>save copy C:\Toronto.tab as E:temp\toronto.tab
>else if city = Chicago then
>save copy C:\Toronto.tab as E:temp\Chicago.tab
>
> I am not to sure if this can be done in Mapinfo or if there is a
>better way of doing this. If there is any short step solutions,
>HELP would be much appreciated
>
>thanks
>
>
>
>----------------------------------------------------------------------
>To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
>"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]