I'm new to Railo, so may not understand something (been using CF for 10+ years), but why does statement 1 give me the error "string tag [cfset] is not closed", but statement 2 runs fine?
I think it's something to do with the NOT in the front of the array maybe? I am sure it's an oddity in the parser it seems since this also works:
<cfset no2RegisterArray = arrayNew(2)>
Very very odd.
I shall add a bug for it
Mark Drew
Railo Technologies Professional Open Source
skype: mark_railo m...@getrailo.com
+44 7971 852296 http://www.getrailo.com
On 20 Aug 2012, at 18:04, Steve Moore <moor...@co.larimer.co.us> wrote:
> I'm new to Railo, so may not understand something (been using CF for 10+ years), but why does statement 1 give me the error "string tag [cfset] is not closed", but statement 2 runs fine?
> I think it's something to do with the NOT in the front of the array maybe?
> I am sure it's an oddity in the parser it seems since this also works:
> <cfset no2RegisterArray = arrayNew(2)>
> Very very odd.
> I shall add a bug for it
> Mark Drew
> Railo Technologies Professional Open Source
> skype: mark_railo m...@getrailo.com
> +44 7971 852296 http://www.getrailo.com
> On 20 Aug 2012, at 18:04, Steve Moore <moor...@co.larimer.co.us> wrote:
> > I'm new to Railo, so may not understand something (been using CF for 10+
> years), but why does statement 1 give me the error "string tag [cfset] is
> not closed", but statement 2 runs fine?
On Wed, Aug 22, 2012 at 6:21 AM, Michael Offner <mich...@getrailo.com> wrote:
> not is a keyword in cfml
> take this example:
> <cfset test=true>
> <cfif not test></cfif>
> "problem" is that the space after the not is optinal when there is no letter
> following.
> example:
> <cfif not 2></cfif>
> same as
> <cfif not2></cfif>
> in ACF this space is required for "not", that is the difference.
Is that not a bug in Railo, then? Sounds like you're saying that's
just a difference between ACF and Railo, and that it's intended
behavior. Are there actually use cases where a developer _wouldn't_
want to use the space?
the reason is that the space between the operator and the oprand is always
optional if possible like for example with the alias of "not":
<cfif *!*test> ...
in this case the space is also optional.
i just try to explain why this happen, i had no intention to say this is
correct.
/micha
2012/8/22 Charlie Griefer <charlie.grie...@gmail.com>
> On Wed, Aug 22, 2012 at 6:21 AM, Michael Offner <mich...@getrailo.com>
> wrote:
> > not is a keyword in cfml
> > take this example:
> > <cfset test=true>
> > <cfif not test></cfif>
> > "problem" is that the space after the not is optinal when there is no
> letter
> > following.
> > example:
> > <cfif not 2></cfif>
> > same as
> > <cfif not2></cfif>
> > in ACF this space is required for "not", that is the difference.
> Is that not a bug in Railo, then? Sounds like you're saying that's
> just a difference between ACF and Railo, and that it's intended
> behavior. Are there actually use cases where a developer _wouldn't_
> want to use the space?
On Wed, Aug 22, 2012 at 7:44 AM, Michael Offner <mich...@getrailo.com> wrote:
> you can consider this as a bug, mark has already open a ticket for this:
> https://issues.jboss.org/browse/RAILO-2038
> the reason is that the space between the operator and the oprand is always
> optional if possible like for example with the alias of "not":
> <cfif !test> ...
> in this case the space is also optional.
> i just try to explain why this happen, i had no intention to say this is
> correct.
Ah, understood. The "!test" example makes perfect sense. Appreciate
the explanation.
<hendrik.kra...@gmail.com> wrote:
> One small thing: If you fix this bug, please still allow <cfif !len(...)>
> without a whitespace inbetween; otherwise I had to change a lot of code.
Heh. Agreed with Hendrik.
<cfif !foo>
<cfif not foo>
Gotta say tho, not a real big fan of <cfif ! foo>.
People do that? (not judging... just asking. really!) :)