[GAP Forum] Help please

muhammad shah shahmaths_problem at hotmail.com
Fri Aug 2 02:48:55 BST 2013


Dear  Abdulsatar,
Experts will give better answer but I think the problem is with the path of the file you are intended to read.
Keep the file in "bin"(Only for convenience) and then use the path in Read command. It should be something like
Read("/cygdrive/C/gap4r6/bin/starcomp");
Good luck,
Muhammad Shah

> From: a.j.t.al-juburie at newcastle.ac.uk
> To: forum at gap-system.org
> Date: Thu, 1 Aug 2013 19:10:11 +0000
> Subject: [GAP Forum] Help please
> 
> Dear All, 
> 
> 
> I am struggling with the following error:
> 
> 
> gap> B:=AutGrpOfPCG([1,2,3,4,5],[[1,2],[1,3],[2,3],[4,5],[3,4]]);
> Error, Variable: 'starcomp' must have an assigned value in
>   R1 := starcomp( V, E ); called from
> <function "AutGrpOfPCG">( <arguments> )
>  called from read-eval loop at line 17 of *stdin*
> you can 'return;' after assigning a value
> 
> 
> **********
> My script is:
> *************
> 
> AutGrpOfPCG:=function(V,E)  # the main program
> 
> local R1,starcomp,St;  # Declaration list
> 
> Read("d:/runprogram/starcomp.txt"); # reading another function  (starcomp) written in a separate text file
> 
> R1:=starcomp(V,E);        # calling the starcomp function
> 
> St:=R1[1];
> return[St];
> 
> end;
> 
> 
> The input to the function is:
> 
> B:=AutGrpOfPCG([1,2,3,4,5],[[1,2],[1,3],[2,3],[4,5],[3,4]]);
> 
> 
> 
> If I remove the "starcomp" from the local declaration list, the code is working but with the following warning message:
>     
> Syntax error: warning: unbound global variable
> R1:=starcomp(V,E);        
> 
> Any idea and/or help are more than appreciated
> 
> 
> Regards,
> 
> 
> Abdulsatar
> 
> 
> 
> 
> 
> _______________________________________________
> Forum mailing list
> Forum at mail.gap-system.org
> http://mail.gap-system.org/mailman/listinfo/forum
 		 	   		  


More information about the Forum mailing list