Wojciech Pieprzyca wrote: > Dear all, > > In the tutorial of ECLiPSe I currently study, there is the following > example at chapter 8: > > ?- X :: -10 .. 10. > > In my ECLiPSe version when I copy out it literally I get an error: > string stream 27: syntax error: postfix/infix operator expected > | [X]::-1..10 > | ^ here > > I only get the exact error you are getting (with lib(ic) loaded) if I type in [eclipse 2]: [X] ::-10..10. syntax error: postfix/infix operator expected | [X] ::-10..10. | ^ here [eclipse 2]: The important difference between this and what is in the tutorial is the space between :: and the -10. The parser gets confused by the if there is no space between :: and the -, because this can be a : operator folllowed by the :- operator. > I found that probably the parentheses are missed because if I try to run > ?- X ::(-10 .. 10). > it works fine. For positive numbers (without minus ahead) both version > work correctly. > > In this case the bracket serves as a seperator between the -10 and the ::, so that why it works. Cheers, Kish > Is it the real cause of the problem ? > > Best regards, > Wojciech Pieprzyca > > > _______________________________________________ > ECLiPSe-Users mailing list > ECLiPSe-Users_at_crosscoreop.com > http://www.crosscoreop.com/mailman/options/eclipse-users >Received on Thu Aug 30 2007 - 21:32:46 CEST
This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET