Re: gets() and "string" variable type
- Posted by Andy Drummond <andy at kes??eltele.com> Sep 15, 2007
- 629 views
Jason Gade wrote: > > I think I understand your "*4" question a little bit better... > > Euphoria assumes that longs and pointers are the same size, namely 4 bytes. > The compiler takes care of the "*4". There is no byte addressing done, it's > all done by 4. > > Does that help any? The pointer arithmetic takes the type's sizeof into > account > automagically. > I would like to say that this demonstrates the excellence of Euphoria sequences - and the language as a whole. No more do I have to wonder if my pointer should step by 1, 2 or 4. No more type-casting ulongs to HWND, no more adding code to check pointers are pointing to valid data, no more shuffling things about to add a string where there was only a word before... And maybe the idea of byte-sized items in string sequences isn't quite so good; certainly it is so easy to interface with DLLs that I can easily write myself a DLL as a text buffer or whatever... So thanks, Rob, your language has made programming umpteen times easier! Andy