If and isType with arrays

DMon no at mail.com
Wed Oct 7 17:20:34 UTC 2020

On Wednesday, 7 October 2020 at 16:39:07 UTC, Paul Backus wrote:
> On Wednesday, 7 October 2020 at 16:25:33 UTC, DMon wrote:
>> Can isType be used as a condition in an if statement with 
>> arrays?
> You can do this with `is()` and `typeof()`:
> if (is(typeof(a) == int[5]))
> {
>     write("true");
> }
> The example you have that "works" is just a coincidence:

I had previously gotten your example to work along with other 
basic properties to enter the if statement and isType in the 
write function.

Thanks for the clarification and the note on the second part.

More information about the Digitalmars-d-learn mailing list