[GAP Forum] Unbound global variable error
Ha T. Lam
hatlam at gmail.com
Thu Aug 30 21:17:18 BST 2012
Sorry if I double-post this question. I emailed the forum unsubscribed and
have been waited moderating for a week. I thought I would try my chance
again as a member.
Dear GAP forum,
>
> I'm getting the unbound global variable error when I put the following in
> a file and Read it in:
> -------------------------------------------
> Foo1:=function()
> local g;
> g:=2;
> Foo2(g);
> end;
>
> Foo2:=function(a)
> Print(a,"\n");
> end;
>
> Foo1();
> -------------------------------------------
>
> Syntax error: warning: unbound global variable in temp.gi line 6
> Foo2(g);
> ^
>
> I'm running GAP 4.5.5. Actually I have a bigger program that gives me
> various unbound global variable errors, but I've stripped it down to this,
> and still have the error. Any idea why?
>
> Ha T. Lam
>
More information about the Forum
mailing list