shivawu/topcoder-greed — pull request #34 by vexorian (2013-09-15 19:38:16+00:00)
Title: long instead of long long in c++ template and conditions in ${if

A nitpick of mine is to use long and not long long (not very clean). The TC server now accepts long, so it is perfectly possible. But Greed sends the type as long long and there is no way in configuration to change this.

So i was trying to do it with template conditionals. Although the jmte page says that you can use = operator to compare string literals, it is not really working for me:

${if Method.ReturnType = "long long" }
long
${end}

This would be perfect if it worked, but it seems that the condition returns true regardless of the string literal. I am not able to find good examples for how to do comparisons in jmte.

An elegant way to fix this in the plugin (if it is really impossible to do it with templates) would be to add a .LongInteger to the type predefined variables like .RealNumber and .String