Steve Graham wrote:
> When trying to  compile a route, I keep getting syntax error (400;369)
> 
> Here is the snippet that offends.  The line is marked.
> 
> procedure printReport(districts)
>    local district, i, routes
> 
>    outrp := open("route_print.txt", w) | stop("Unable to write to
> route_print.txt")
>    every district := (1 | 2 | 3 | "X") do {
>       write(outrp, "District ",i)
>       routes := sort(districts[district],3)
>       every i := 1 to *routes by 2 {
>          j := ((i - 1) * 2) + 1
> -->    if (i == 1) then write(outrp)
>          write(outrp, "   Route ", j)
>          write("\n      Home Teachers")
>          every htwrite(outrp, "      ", pop(routes[i+1, "hts"]))
>          write("\n      Families")
>          every write(outrp, "      ", pop(routes[i+1, "families"]))
>       }
>    }
>    close(outrp)
> end
> 
> I hope you see something I am missing.

You're missing the 'do' on the

     every i := 1 to *routes by 2 {

line:  every i := 1 to *routes by 2 do {

Odd that it took so many lines for the compiler to figure
out something was wrong [I suspect the line numbering is off...]

(Also, check your calls to pop (both places).  I suspect
you don't want what you have there!)


-- 
Steve Wampler     {s...@tapestry.tucson.az.us}
The gods that smiled upon your birth are laughing now. -- fortune cookie

------------------------------------------------------------------------------
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to