Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Prompt "Display all 225 possibilities?"
PostPosted: Thu Jan 24, 2013 6:12 pm 
Hello,

always I try to complie my code I get a strange prompt like "Display all 225 possibilities? (y or n)". You can see it on this screen:
Image

Here is my code:
Code:
LIB "poly.lib";
proc DivAlgo(list L) {
   poly p = L[1];
   list a = list(0:size(L));
   L = delete(L, 1);
   while(p != 0) {
      poly LTp = lead(p);
      int flag = 0;   
      for(int i = 0; i < size(L); i++) {
         if(gcd(LTp, L[i]) != 1) {
            p = p - (LTp/lead(L[i])) * L[i];
            a[i] = a[i] + LTp/lead(L[i]);
            flag = 1;
            break;
         };
      };
      if(flag == 0) {
         p = p - LTp;
         a[size(a)] = a[size(a)] + LTp;
      };
   };
   return(a);
};


I found out, that the message appears after the while-loop. I shorted the code on the screen.
But what's the reason? Can someone help me?

Best regards!


Report this post
Top
  
Reply with quote  
 Post subject: Re: Prompt "Display all 225 possibilities?"
PostPosted: Fri Jan 25, 2013 6:30 am 

Joined: Sat Oct 01, 2005 11:40 am
Posts: 40
Location: IIT Guwahati, Guwahati, Assam, INDIA
Its because of your editor and the way you have written your code. Most probably you have pressed "tab" for alignment during while loop. On Singular command prompt if you press "tab" key twice, you will get the same message.

If you replace "tab" with spaces in your file, then this message will go away.

Hope this helps.

VInay


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Prompt "Display all 225 possibilities?"
PostPosted: Sat Jan 26, 2013 2:42 pm 
Thanks a lot!


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

It is currently Fri May 13, 2022 10:58 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group