On 31/10/11 17:37, Greg Coelho wrote:
> Hey Guys,
> 
> I am concatenating an alpha code into a string providing that the code 
> does not already exist (in the string).  If my existing string = X.STRING 
> and my code = X.CODE should the following work?
> 
> IF X.STRING MATCH X.CODE THEN
> END ELSE
>   X.STRING = X.STRING:',':X.CODE
> END
> 
I notice nobody seems to have pointed out a MAJOR gotcha in using MATCH.
If your code is as described, you'll avoid it, but what validation have
you got in place on X.CODE? Is it possible that numbers could
accidentally get into it?

We did something like this years ago with a line something like

IF TEXT MATCH USER THEN

where USER was the department code followed by the user's initials. And
while most departments were alphas, there were a couple of alphanumerics.

All went well until Albert from M6 ran the code ...

USER = "M6AWT"

Who can see the landmine just waiting to explode ... ?

Cheers,
Wol
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to