Juergen Kuehlwein wrote:@paul doe,
thanks for your interest! I will post a link to the executables and how to use them - maybe tomorrow.
You're welcome. I'll give them a whirl as soon as I can, I promise.
Juergen Kuehlwein wrote:stringizing that takes spaces into account
doable, but what for?
...May I suggest a 'destringize' also?
could you expand on this too. I don´t understand, what exactly you want: "(a string to a valid symbol)" to my understanding this is what "#" already does. Return a literal string from a macro parameter (which can be a symbol).
Check out how the templating framework is laid out in the project I linked before to see a concrete example. But, for quick reference:
Code: Select all
#macro foo( bar )
foo( integer ptr )
That macro indeed expands to integer ptr, which is not a valid symbol. A valid symbol could be, in this case, integer_ptr, _integerptr, _integer_ptr_ or anything like that. That is, it somehows mangles the valid data type into a valid symbol. And before you answer: yes, this can be done with variadic macros and no, I don't want to do it that way (it forces you to syntax like, for example, dim l as LinkedList( of( integer, ptr ) ) which looks awful).