Re: parsing error with ?: usage

2006-09-08 Thread Bram Moolenaar
Hari Krishna Dara wrote: I have hit this thrice already, while using the ?: ternary operator, in some conditions, you are forced to put whitespace to separate the operator otherwise Vim gets confused. Here is something that fails: let direction = (a:0?a:1:1) I had this issue before

Re: parsing error with ?: usage

2006-09-08 Thread Hari Krishna Dara
On Fri, 8 Sep 2006 at 6:08am, A.J.Mechelynck wrote: Hari Krishna Dara wrote: [...] I know that this is possible, but as I said previously, it is a force of habit to compact as much as possible in some situations, though I normally prefer using whitespace and parenthesis to improve

Re: parsing error with ?: usage

2006-09-07 Thread Tim Chase
this unambiguously? The usage could be even worse, something like: let direction = (a:01?a:2:a:1) Personally, I never leave these sorts of matters to the whims of the parser designer (no offense, Bram :) and always specify just as I would with something as ambiguous as a and b

Re: parsing error with ?: usage

2006-09-07 Thread A.J.Mechelynck
Hari Krishna Dara wrote: I have hit this thrice already, while using the ?: ternary operator, in some conditions, you are forced to put whitespace to separate the operator otherwise Vim gets confused. Here is something that fails: let direction = (a:0?a:1:1) I had this issue before calling

Re: parsing error with ?: usage

2006-09-07 Thread Hari Krishna Dara
On Fri, 8 Sep 2006 at 4:41am, A.J.Mechelynck wrote: Hari Krishna Dara wrote: I have hit this thrice already, while using the ?: ternary operator, in some conditions, you are forced to put whitespace to separate the operator otherwise Vim gets confused. Here is something that fails:

Re: parsing error with ?: usage

2006-09-07 Thread A.J.Mechelynck
Hari Krishna Dara wrote: [...] I know that this is possible, but as I said previously, it is a force of habit to compact as much as possible in some situations, though I normally prefer using whitespace and parenthesis to improve clarity. Also, the reason I mentioned using spaces is not really