You're looking for an Enum or enumeration.  There's an example in the 
source tree 
(https://github.com/JuliaLang/julia/blob/master/examples/enum.jl) and 
there's been some discussion about including it in base 
(https://github.com/JuliaLang/julia/issues/3080).

On Wednesday, August 6, 2014 10:42:33 AM UTC-4, Joe Vijay wrote:
>
>
> Julia Noob here.
>
> How to create a variable of custom type which will allow one of known 
> three values.
>
> Lets say, variable i is of type OneTwoThree which can be assigned 1 or a 
>  2 or a 3
>
> Thank you,
>
> -Joe
>
>
>

Reply via email to