FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
Escape Character
Escape Character
Débuté par funtoosh, 23 juin 2014 19:30 - 2 réponses
Connectez-vous…
funtoosh
#1
Membre enregistré
6 messages
Posté le 23 juin 2014 - 19:30
Hi
I've recently moved to Windev from C# and i'm really enjoying it
But i've one query what is the escape character in Windev ?
Like in C# the escape character is "\" , what is the escape character in windev ?
Thanks
--
Kapil Jain
Signaler
0
0
Joel
#2
Posté le 23 juin 2014 - 23:25
hi,
With Windev, you don't need any Escape Character.
Here some examples :
str
=
"ab"
"c"
+
RC
+
"d"
Info
(
str
)
// Result is : a'b"c on 1st line, and d on 2nd line
New version, exists since version WD12 (?) , very simple to use :
str
= [
a'b"c
d
]
Info
(
str
)
// same result as example n°1
These examples are very simple.
In real life, it is generally more complex :
For example, you read a description X in a file, and you need to build a string with this description X .
Depending of what you need , character ' in the description X may be a problem, or character " may be a problem.
You should use function sFormat, with 2nd parameter ' or " :
Procedure
s
Format
(
pCh
,
xx
=
"'"
)
s
Ch is
string
=
Remplace
(
pCh
,
xx
,
xx
+
xx
)
IF
s
Ch
=
""
THEN
s
Ch
=
" "
RETURN
xx
+
s
Ch
+
xx
I need very often to use this function, with 2nd parameter '.
And in very specific cases, I need to use it with 2nd parameter "
newstring
=
s
Format
(
string
,
""
""
)
OR
newstring
=
s
Format
(
string
,
Charact
(
34
)
)
// these 2 lines are totally similar.
Signaler
0
0
funtoosh
#3
Membre enregistré
6 messages
Posté le 24 juin 2014 - 08:15
Thanks, ascii code looks neat
--
Kapil Jain
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte