string = nietypowe/zabronione znaki

O jezykach programowania w platformach i nie tylko.
Awatar użytkownika
reptile
Maniak
Maniak
Posty: 2799
Rejestracja: 13 gru 2008, 13:48

string = nietypowe/zabronione znaki

Nieprzeczytany post autor: reptile »

string - nietypowe znaki

np.

Kod: Zaznacz cały

string jeden  =""fraza"" ;
Ja powinien być prawidłowo zapisany string w którym chce się przekazać np cudzysłów lub inny znak używany przez kompilator.
Już raz to przerabiałem, ale znów mi coś nie wychodzi :roll:

Gdzie to jest w manualu mql4 ?
R.E.P.T.I.L.E. - Robotic Electronic Person Trained for Infiltration and Logical Exploration (off-line,only e-mail)

Awatar użytkownika
Tig3r
Przyjaciel Forum
Przyjaciel Forum
Posty: 2310
Rejestracja: 02 sty 2008, 10:46

Nieprzeczytany post autor: Tig3r »

"\X"
Tak to się tworzy - gdzie X to jakaś litera
protestuj ;)

W metaedytorze:
MQL4 Reference -> Basics -> Data types -> Literal constants


Any single character enclosed in single quotes or a hexadecimal ASCII-code of a character looking like '\x10' is a character constant of integer type. Some characters like a single quote ('), double quote (") a question mark (?), a reverse slash (\), and control characters can be represented as a combination of characters starting with a reverse slash (\) according to the table below:

line feed NL (LF) \n
horizontal tab HT \t
carriage return CR \r
reverse slash \ \\
single quote ' \'
double quote " \"
hexadecimal ASCII-code hh \xhh
If a character different from those listed above follows the reverse slash, the result will not be defined:

int a = 'A';
int b = '$';
int c = '©'; // code 0xA9
int d = '\xAE'; // symbol code ®
Its internal representation is a long 4-byte integer number. Literal constants can assume values from 0 to 255. If the constant exceeds this given range, the result is undefined.
======================================================
Nie głupi ten co nie wie, lecz ten który nie chce się nauczyć..

Awatar użytkownika
reptile
Maniak
Maniak
Posty: 2799
Rejestracja: 13 gru 2008, 13:48

Nieprzeczytany post autor: reptile »

Tig3r pisze:protestuj Wink
protestuje przeciw prostom nieuzasadnionym :mrgreen:

dzięki !

query w mysql mnie wykańczają :lol:
R.E.P.T.I.L.E. - Robotic Electronic Person Trained for Infiltration and Logical Exploration (off-line,only e-mail)

Awatar użytkownika
siersciuch
Pasjonat
Pasjonat
Posty: 407
Rejestracja: 06 kwie 2010, 20:31

Nieprzeczytany post autor: siersciuch »

zamiast tego wewnetrzengo "..." daj dwa razy po >> ' << To Ci zrobi ''. I tak samo bedzie wygladać, chyba ze muisz dac cudzysłów w cudzysłowiu
jeżeli będziesz uparty, prawdopodobnie częściej odniesiesz sukces, niż doznasz porażki.

Awatar użytkownika
reptile
Maniak
Maniak
Posty: 2799
Rejestracja: 13 gru 2008, 13:48

Nieprzeczytany post autor: reptile »

musi bo to właśnie ma być string będący query dla mysql'a
R.E.P.T.I.L.E. - Robotic Electronic Person Trained for Infiltration and Logical Exploration (off-line,only e-mail)

ODPOWIEDZ