[nim-dev] Re: Need help with subscript.

  • From: Stefan_Salewski <mail@xxxxxxxxxxxx>
  • To: nim-dev@xxxxxxxxxxxxx
  • Date: Fri, 27 Nov 2015 21:38:54 +0000

. code-block:: nim

proc `[]`(a:ptr aiScene,b:cuint): aiScene =
result = a[b]

If a is a pointer to an object, then a[b] is not valid syntax in Nim. That
works when a is an array or a sequence.

Other related posts: