Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
String too long to fit
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00713803
Message ID:
00714047
Views:
24
>Well now I am going to be difficult (since this thread is way too long anyways).
>
>To sum up:
>
>lcStringLiteral = "EEEEE"
>is a string literal because it is hard coded, but
>lcNotStringLiteral = replicate("E",5)
>is not a string literal because it is generated by a function but they are both the same string of characters (note not character string).
>

The variable itself is not where the "string literal" distinction lies. In your above example, "EEEEE" is the string constant (or literal). The variable you are assigning it to is *not* a string constant, it is a variable. That is what I was trying to show in my previous example.

IOW, both variables contain the same string of characters. Neither of the variables are string literals.


>The point of my first answer to this person that started the thread was to let him (or her {I can't even remember who started this thread}) know what there was a limit of 254 (255 in vfp8beta {according to Sergey}) for character expressins used in some (i can't say all because i haven't used them all yet) functions, and that if you exceed this limit you will (more than likely) get the error message: String too long to fit.
>

Hmmm...you've got me wondering about something here.

>lcStringLiteral="abcdefghijklmnopqrstuvwxyzabcdefghijk < SNIP > "
>
>which is a string of 256 characters (not a character string).
>When excecuting this line in my command window (VFP7.0) I got the following error message:
>"Command contains unrecognized phrase/keyword."

You are correct...I don't think person who started this thread exceeded the 255 string constant limit. I can only assume they have a huge string, putting themselves up against a march larger limitation. But until they post more details, we won't know for sure *g*
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform