If I'm using your code verbatim I get

julia> removeLine(poly,1)

ErrorException("type Poly has no field op")



julia> versioninfo()



julia> 

Julia Version 0.2.0

julia> 


Commit 05c6461 (2013-11-16 23:44 UTC)

Platform Info:

  System: Windows (x86_64-w64-mingw32)

  WORD_SIZE: 64

  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY)

  LAPACK: libopenblas




Le jeudi 8 mai 2014 17:09:24 UTC+2, Johan Sigfrids a écrit :
>
> You can still use meta-programming to generate the code
>
> function removeLine(poly, index)
>     for op = (:a, :b, :x1, :y1, :x2, :y2, :typ)
>         @eval splice!($poly.$op, $index)
>     end
> end
>
>
>>>> 

Reply via email to