Ian,
You cannot use the IF statement directly, but I use the following statement
to check for the existence of a table before opening it. It works as an if
Statement.
***
dim szTAB as String
dim szFile as String
szTAB = "Arealanvendelse"
szFile = szTAB + ".tab"
run command left$("open table szTAB",1000*int(FileExists(szFile)))
***
Med Venlig Hilsen / Kind Regards
Anders Dalgaard
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GIS & Geodata
ASIAQ -Greenland Survey
Postboks 1003
3900 Nuuk
Gronland
[EMAIL PROTECTED] / [EMAIL PROTECTED]
Tel.: +299 348800 FAX: +299 348801
-----Oprindelig meddelelse-----
Fra: Ian Tidy [mailto:IanTidy@;linesmarl.co.nz]
Sendt: 13 November, 2002 21:07
Til: MapInfo-L (E-mail); Mi-User-L (E-mail)
Emne: MI-L If Statements in Workspaces
Hi All
I am trying to build a workspace that loads different files depending on the
product that open the workspace (Runtime, MapInfo, or ProViewer). I have
managed to get the workspace to workout the product, but I am having a
problem with the 'IF' statement in the workspace.
The code I have is as follows:
!Workspace
!Version 600
!Charset WindowsLatin1
Dim iProd as Integer
iProd = SystemInfo(16)
Note "Product is " + str$(iProd)
If iProd <> 200 then goto LINKED
LIVE:
The error I get is "Unrecognized Command: if.". What have I done wrong?
How can I work around this.
Cheers Ian
Ian Tidy
Network - Technical Assistant
Marlborough Lines
1 Alfred Street, P.O. Box 144, Blenheim, New Zealand
Phone + 64 (3) 577 7007, Fax + 64 (3) 577 7014
DDI Phone +64 (3) 579 3831, Mobile + 64 (27) 283 1862
mailto:IanTidy@;linesmarl.co.nz
http://www.marlboroughlines.co.nz
This e-mail is only intended to be read by the named recipient. It may
contain information which is confidential or subject to legal privilege. If
you are not the intended recipient you must delete this e-mail and you may
not use any information contained in it. Legal privilege is not waived
because you have read this e-mail.
############################################################################
#########
This e-mail message has been scanned for Viruses and Content and cleared
by MailMarshal.
############################################################################
#########
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 4075
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 4082