Function pointer array slice?

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jul 11 03:54:45 PDT 2015


On Sat, 11 Jul 2015 09:54:40 +0000, tcak wrote:

> On Saturday, 11 July 2015 at 09:30:43 UTC, Tofu Ninja wrote:
>> So simple syntax question, how do I make an array slice of function
>> pointers?
>>
>> I just have no idea where to put the [] on something like
>>
>>      void function() nothrow pure @nogc @safe arrayName;
>>
>> Or should I just alias it and make an array of the alias?
>>
>>      alias f = void function() nothrow pure @nogc @safe;
>>      f[] arrayName;
> 
> Alias is the correct way IMO.

yet

  void function() nothrow pure @nogc @safe [2]arrayName;

is perfectly fine too.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150711/b6b3ea66/attachment.sig>


More information about the Digitalmars-d-learn mailing list