Gambas-it

Gambas3 => Domande tecniche => Topic aperto da: vuott - 30 Dicembre 2012, 13:17:27

Titolo: Convertire puntatori a stringhe (prendendo il valore numerico del puntatore)
Inserito da: vuott - 30 Dicembre 2012, 13:17:27
Riporto di seguito una discussione posta nella Mailing List Internazionale:


« What's the point to be able to convert pointers to strings (take the numerical value of the pointer)?
If I would like a string representation of a pointer I would at least want it in hexadecimal form.
But I also think most people that convert pointers to strings want to get the string out of a char* that points to a NULL-terminated string.

Emil Lenngren
»



« It's just some sort of shortcut:
CStr(pointer) = CStr(CInt(pointer)) or CStr(CLong(pointer)) according to the size of the pointer.

I found that logical, so that a Pointer can be directly used as a Collection key.

But I agree that using hexadecimal would be better.

Regards,

--
Benoît Minisini
»