field = question

Nancy Palmquist nlp at vss3.com
Mon Nov 23 11:04:25 PST 2009


Richard Kreiss wrote:
> I think this has been discussed previously but....
>
> Declare filename
> ::filename="market_memo@"{""
>
> If:filename eq "market_memo@"
> then:GOTO foobar
> if:filename eq "market_memo at archive"
> then:GOTO foobar1
>
> Both will test true when filename="market_memo@"
>
> When I change declare filename(32,*) and run the same programming, the test
> works properly.
>
> What is the difference between the cast and uncast declaration of filename
> allowing one to work and the other to "fail"?
>
>
> Richard Kreiss
> GCC Consulting
> rkreiss at gccconsulting.net
>   
>
>
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
>   
Richard,

I have a plan for this kind of thing.


If:filename{"~" eq "market_memo@"{"~"
then:GOTO foobar
if:filename{"~" eq "market_memo at archive"{"~"
then:GOTO foobar1

I append a character such as ~ or ^ to the end of the string and then
test.  It eliminates the kind of matches you encountered here.

Works great on left justified codes that vary in length and would match
incorrectly if left without the extra character.

Nancy

-- 
Nancy Palmquist 		MOS & filePro Training Available
Virtual Software Systems	Web Based Training and Consulting	
PHONE: (412) 835-9417		   Web site:  http://www.vss3.com




More information about the Filepro-list mailing list