From: Martin DeMello Date: 2009-04-04T15:21:58+09:00 Subject: Re: Got some syntax error I can't spot. Can you (I hope)? On Sat, Apr 4, 2009 at 11:34 AM, RichardOnRails wrote: > Hi all, > > I pulled my problem code from my app into a test on http://www.pastie.org/436616. > > Lines 13-19 are the problem code in my app. > > Lines preceding them I set up needed definitions and test individual > components of the problematic code. > > The final lines display the error lines 13-19 produce.  Can you see > what the problem is? It's a precedence thing - % has higher precedence than +. Try this: # before puts "Considering saving the trade-group" + "\tfor symbol \"%s\", "+ "\tgroup size: %d, " + "\tand # groups saved thus far: " + "open(%d), " + "completed(%d)" % [savedSymbol, tradeGroup.size, openTrades.size, completedTrades.size] # after puts ("Considering saving the trade-group" + "\tfor symbol \"%s\", "+ "\tgroup size: %d, " + "\tand # groups saved thus far: " + "open(%d), " + "completed(%d)") % [savedSymbol, tradeGroup.size, openTrades.size, completedTrades.size] martin > > Thanks in Advance, > Richard > >