>Good morning all...
>
>My code prints labels based on the batch number of a file. The batch number in a char and set up 121-NN where NN increments 1 - 99. (121 is the Julian day) However, if I put trim(batch) = '121-10' it gives me all the files with a batch number of '121-1'.
>
>How can I get around this?
>
>Thanks again,
>Sunshine
Aside from what everyone else has replied with,
the reason this is probably happening is confusin over the = operator
in foxpro
? '121-10' = '121-1' -> .T.
? '121-1' = '121-10' -> .F.
This is because = (when working with strings) means 'begins with'
whereas == is a 'same as' operator.
padding the strings out with spaces (like sergey reccomends) is a good way to get around it as
? '121-10' = '121-1 ' -> .F.
Anyway you got plenty of slutions here, just though Id clear up why it happens :)