# Cause of ArcGIS Raster Calculator Parsing error <type 'exceptions.SyntaxError'>: invalid syntax?

This is my first attempt at much code in the raster calculator of ArcMap 10.0, but I think I'm close.

I have nine rasters (A-I below) and want a new raster with value = 1 where any of the rasters have field 1 >= 1 and <= 366 and field 2 not equal to 5.

Here's what I've got:

``````Con(([A].1|[B].1|[C].1|[D].1|[E].1|[F].1|[G].1|[H].1|[I].1 >= 1  &  <= 366) & ([A].2|[B].2|[C].2|[D].2|[E].2|[F].2|[G].2|[H].2|[I].2 != 5) , 1,0)
``````

I get the little red circle with an X in the top left of the raster calculator window and an error message:

Parsing error : invalid syntax (line 1).

Anyone know what I've got wrong?

• all done. sorry. Commented Jun 10, 2014 at 21:17
• I believe the syntax is `Con((A[1]|B[1]|C[1]|D[1]|E[1]|F[1]|G[1]|H[1]|I[1] >= 1 & <= 366) & (A[2]|B[2]|C[2]|D[2]|E[2]|F[2]|G[2]|H[2]|I[2] != 5) , 1,0)` Commented Jun 10, 2014 at 21:47
• Thanks, Jason. But, I'm afraid not. That change doesn't do it. And, even if I shorten it up to just one raster's worth both [A].1 and A[1] result in the same original error. Commented Jun 10, 2014 at 23:06

2. Along the lines of Jason's comment, I found this forum post that states dot notation doesn't work in Raster Calculator beginning with 10.0. The forum post suggests using Lookup to create a separate raster from the second field. It suggests this can be accomplished in the Raster Calculator by using `Lookup("rastername","fieldname")`.
3. I haven't tested this or researched documentation, but if it works anything like the Field Calculator (which all examples I've come across indicate it does), all statements must be explicit. This means you cannot do `(a or b or c) x`, you have to do `(a x) or (b x) or (c x)`. With the Field Calculator this can be circumvented using an `IN()` function to specify a list of values or under the right circumstances a specific field, but I don't know if that would work here.