To expand on this thought an alternatve and imho a more elloquant solution
is to use the 'INT' function

if the example below this would become

left$(ColumnX,int(columny="criteria")*254)

INT(condition) will return 0 if the condition is false and 1 in the
condition is true thereby determining the length of the string returned by
left$(string,int(condition))

I think this is easier to read and can be used for any data type or
comparison.  For example if the user wanted to only label features between
certain values then they could use:

left$(ColumnX,int(columnX>100 and columnX < 250)*254).

I make extensive use of the INT function in workspace files to add
'intelligence' to the workspace.

for example 

run command left$("beep",int(Weekday(Curdate())=2)*100)  'beep if it is a
monday




Cheers

Martin




-----Original Message-----
From: Dr. Franz-Josef Behr [mailto:[EMAIL PROTECTED]]
Sent: Saturday, 22 September 2001 01:07
To: MapInfo-L
Subject: Re: MI-L Label Expressions


One additional possibility:

For labeling only if an attribute matches  e x a c t l y  some text,
use:

Left$(ColumnX,(1-Abs(StringCompare(Str$(ColumnY), "criteria"")))*254)

See the mail from Dmitry Bogdanov,
http://testdrive.mapinfo.com/tdc/mapinfo-l.nsf/1fcc8c6e8c3268b88525644200498
df0/7f7df8bd4230698c852565a20030e016?OpenDocument&Highlight=0,labeling


-- 
Mit freundlichen Grüßen / Best regards / Cordialement
i.A.

Franz-Josef Behr

------------------------------------------------------------------------
We all learn by sharing what we know... (R. DiBlasi)

Dr. Franz-Josef Behr                 Phone: ++49 / 7243 / 5641-20
GIS-Consultant                       Fax:   ++49 / 7243 / 5641-99
Graphservice GmbH                    EMail: [EMAIL PROTECTED]
Im Ermlisgrund 18                    D-76337 Waldbronn
Author of: Strategisches GIS-Management - http://www.gis-management.de
WWW: http://www.graphservice.de
Personal Home Page: http://home.pages.de/~fjbehr und
http://www.gis-news.de  [EMAIL PROTECTED]



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to