Arraysearch()

David Thompson dthmpsn1 at uiuc.edu
Mon Apr 7 11:09:41 PDT 2008


>Following the example in the Reference, the word searched for (here, 
>Music) has no formatting (ie., "Music") beyond the wild card 
>characters "?" and "*".

I may have misread this. I no longer think Music 
is a variable containing the first word. I think 
it *is* the first word. In which case it should be

message array(slug,arraysearch(slug,"Music*",1,¶),¶)

The point is that computer software is many times 
worse than a human like me at figuring out what 
it is that you really meant to say. Rigid syntax 
rules are needed to tell it in no uncertain 
terms. Putting quotes around some text like 
"Music" is how you tell it that this is the text 
itself. Leaving the quotes off  is how you tell 
it that this is a field or variable containing 
the text. The same is true for the *. Putting it 
within the quotes -- "Music*" -- tells the 
software that it is part of the text. Leaving the 
quotes off -- Music* -- tells it that this is a 
field or variable followed by a multiplication 
operator.

Dave


More information about the Qna mailing list