Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

@NamedTuple fails

$
0
0

Hi there,

I copied this line:

@NamedTuple{a::Int, b::String}

from the manual to the REPL and instead of the expected

NamedTuple{(:a, :b),Tuple{Int64,String}}

it returned an error:

ERROR: syntax: invalid macro usage "@(NamedTuple{a::Int, b::String})"

I also tried just typing

@NamedTuple

and received an

ERROR: LoadError: UndefVarError: @NamedTuple not defined

What did I do wrong?

Thanks heartily,
Inbar

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 2795

Trending Articles