Differences From Artifact [8b0f3086985103aa]:
- File
TZTesterSp/tangentz/TZTester.java
- 2011-02-23 11:52:24 - part of checkin [f19d33f1b6] on branch trunk - a bit of comment (user: kinaba) [annotate]
To Artifact [9ea2716e7a7a319a]:
- File
TZTesterSp/tangentz/TZTester.java
- 2011-05-19 08:27:51 - part of checkin [8bf7448987] on branch trunk - Tabun fixed long[] problem of TZTester (not tested yet). (user: kinaba) [annotate]
271 */ 271 */
272 private void generate_parameter(int Index, StringBuffer Code, DataType P 272 private void generate_parameter(int Index, StringBuffer Code, DataType P
273 { 273 {
274 // <<modified by cafelier>> : named parameters 274 // <<modified by cafelier>> : named parameters
275 String Name = (Index==-1 ? "_" : m_Problem.getParamNames()[Index 275 String Name = (Index==-1 ? "_" : m_Problem.getParamNames()[Index
276 276
277 String Desc = ParamType.getBaseName(); 277 String Desc = ParamType.getBaseName();
> 278 if (Desc.equals("long") || Desc.equals("Long"))
> 279 Desc = "long long";
278 280
279 if (ParamType.getDimension() == 0) 281 if (ParamType.getDimension() == 0)
280 { 282 {
281 // Just a scalar value, simply initialize it at declarat 283 // Just a scalar value, simply initialize it at declarat
282 if (Desc.equals("long") || Desc.equals("Long")) | 284 if (Desc.equals("long long"))
283 Code.append(ParamType.getDescriptor(m_Language) 285 Code.append(ParamType.getDescriptor(m_Language)
284 else 286 else
285 Code.append(ParamType.getDescriptor(m_Language) 287 Code.append(ParamType.getDescriptor(m_Language)
286 } 288 }
287 else 289 else
288 { 290 {
289 // <<modified by cafelier>> : empty array 291 // <<modified by cafelier>> : empty array
................................................................................................................................................................................
290 if( Input.matches("^[\\s\\{\\}]+$") ) 292 if( Input.matches("^[\\s\\{\\}]+$") )
291 { 293 {
292 Code.append(ParamType.getDescriptor(m_Language) 294 Code.append(ParamType.getDescriptor(m_Language)
293 } 295 }
294 else 296 else
295 { 297 {
296 // Arrays need to be converted to vector<type> b 298 // Arrays need to be converted to vector<type> b
> 299 if (Desc.equals("long long"))
> 300 Input = Input.replaceAll("¥¥d+","$1LL");
297 Code.append(ParamType.getBaseName().toLowerCase( | 301 Code.append(Desc.toLowerCase() + " " + Name + "_
298 Code.append(" "+ParamType.getDescriptor(m_Langu 302 Code.append(" "+ParamType.getDescriptor(m_Langu
299 } 303 }
300 } 304 }
301 } 305 }
302 } 306 }