Read-only forum archive

Prompt "Display all 225 possibilities?"

Prompt "Display all 225 possibilities?"

CtrlAlt · 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!

Re: Prompt "Display all 225 possibilities?"

vinay · Fri Jan 25, 2013 6:30 am

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

Re: Prompt "Display all 225 possibilities?"

CtrlAlt · Sat Jan 26, 2013 2:42 pm

Thanks a lot!