Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filter question
Message
From
31/03/2000 19:42:58
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00353657
Message ID:
00353755
Views:
15
I think you're misunderstanding my question. I know that [] can be used as string delimiters and I have a pretty good handle on macro expansion. (At least normally, I do. Right now I'm exhausted and basic syntax is getting me muddled) What I didn't understand is why you gave two ways of doing what I want; one with the delimiters, one without. IOW, what advantage does:

SET FILTER TO custno = [&lccustno]

have over

SET FILTER TO custno = &lccustno

The reason I want to know is because I tried the second one before I asked the question and it didn't work. I'm thinking it's because it interpreted the value of lccustno as being a variable name since there were no quotes, so the first one should work better.

Thanks,

Michelle


>[] can be used as string delimiters, like '' or ""; since they're less likely to occur in most string expressions, they're a safer choice for making a literal. String literals must be quote-encapsulated, so that means "string", 'string' or [string] is needed to make the literal. I find the last less subject to a stray delimiter in the string, for example, if you use the single quote, the macro expansion causes an error with the following example:
>
>
>lcCustName = "Pinhead Ed"
>SET FILTER TO custname = '&lcCustName' && seems to work
>lcCustName = "O'Malley"
>SET FILTER TO custname = '&lcCustName' && whut did it dew?
>
>I hate to use your favorite FLA, but RTFM and look at what goes on in string expressions, literals, and macro-expansion.
>
>Numbers are not quote-encapsulated as literals. Macro-expansion requires a string to be specified for expansion.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform