On Thursday, 17 October 2019 at 14:50:23 UTC, Paul Backus wrote:
On Thursday, 17 October 2019 at 14:45:24 UTC, Mil58 wrote:
Hi all...
Does exist (or not?) a way to create array with several types (as in Python)
 (example) :
  xxx[4] myTab = [180, "John", false, -0.771];

Of course, this is doing an Error ;-)   Thanks.

import std.variant;
Variant[4] myTab = variantArray(180, "John", false, -0.771);

Documentation: https://dlang.org/phobos/std_variant.html

T h a n ks    for this(quick) reply :)

Reply via email to