I tested that and it works, thanks.

Chris

On Sat, May 9, 2009 at 3:43 AM, Danilo Freitas <[email protected]> wrote:

> As Stefan said...
> try:
>
> > cdef double var = 0.0
> >
> > def count(int n):
> >     cdef int i
>       global var
> >     for i in range(n):
> >         var += i
> >
> >     return var
>
> I don't know if this is valid in Cython...
> but you may try it.
> I don't how Cython parser works with the "global" keyworld :/
>
> If it isn't valid, somebody may try to fix it (if possible :) ). I
> don't have enought knowledge about it. The only way to discover it is
> trying.
> When you do it, please post here. (I'm speaking only to myself... I
> don't know if this is a already known problem, and if there is a
> solution).
>  _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to