Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Warning: Square brackets as string delimiters
Message
De
12/12/2007 02:43:07
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
11/12/2007 13:38:26
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01274862
Message ID:
01275060
Vues:
7
Cetin,

thanks for listing that. There is one aditional way to declare a string:
#define error 1

? 'An error has occurred'
? [An error has occurred]
TEXT TO lcx noshow
An error has occurred
ENDTEXT
?lcx
Update:

SET TEXT works as well with defines.

Agnes
>Recently I have seen a lot of people are using square brackets as string delimiters. That made me think most of the community isn;t aware of this fact.
>When you use square brackets and there is #define/#include in scope those strings might end with something very different than you expected. ie:
>
>
>#define error 1
>
>? 'An error has occurred'
>? [An error has occurred]
>
>Bottomline: Use single or double quotes as string delimiters unless you know what you're doing with square brackets.
>Cetin
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform