What does q{...} mean?

Gary Willoughby dev at nomad.so
Mon Feb 24 09:06:51 PST 2014


On Monday, 24 February 2014 at 11:53:00 UTC, anonymous wrote:
> On Monday, 24 February 2014 at 11:47:02 UTC, Namespace wrote:
>> On Monday, 24 February 2014 at 11:41:41 UTC, Gary Willoughby 
>> wrote:
>>> I keep seeing this syntax used a bit and i'm stumped to what 
>>> it means. What is it?
>>>
>>> enum foo = q{
>>>  // ???
>>> };
>>
>> http://dlang.org/lex.html#DelimitedString
>
> It's a token string though, not a delimited string. See the
> section "Token Strings" on that page.

What are they used for? Simpler for creating code at compile time?


More information about the Digitalmars-d-learn mailing list