Arrays are not special, just having them of length of 100 you won't want to
initialize them by a literal, the same for seqs.
type GlyphArray* = array[3, int]
type
TextBuffer* = tuple
position : tuple[ x : float, y : float ]
cursor : tuple[ row : int, col : int ]
glyphPositions : GlyphArray
linePositions : seq[tuple[ start: int, stop: int]]
text : string
var my_text : TextBuffer = (position: (25.0, 25.0), cursor: (0,0),
glyphPositions: [3,5,7].GlyphArray, linePositions: @[(0,0)], text:"")
echo my_text.repr
- Defining an array inside a tuple rayman22201
- Re: Defining an array inside a tuple BigEpsilon
- Re: Defining an array inside a tuple LeuGim
- Re: Defining an array inside a tuple Krux02
- Re: Defining an array inside a tuple rayman22201
- Re: Defining an array inside a tuple Udiknedormin
- Re: Defining an array inside a tupl... rayman22201
- Re: Defining an array inside a ... LeuGim
- Re: Defining an array inside a ... Krux02
- Re: Defining an array inside a ... rayman22201
