2009 May 08 7:43 AM
Hi all,
I have a problem a bit complex I don't know how to solve it: I have a dynamically created program that give a syntax error because a string created inside it is too long and don't stay on a single line, so the program created has some lines like this:
tot = d_1 + d_2 + d_3 + d_4 + d_5 +
d_6 + d_7 + d_8 + d_9 .this code doesn't pass the syntax-check before it is executed and the error given is about the second line. So how can I avoid this error ? remember that the program is dynamically created so the code reported is for sample: it's possible to have more than 2 lines.
Thanks to anyone will give me an hint.
Gabriele
1) Can you modify this dynamically created program,
2) or can you change the program which creates this dynamic program?
2009 May 08 7:56 AM
2009 May 08 8:01 AM
2009 May 08 8:36 AM
Hi!
Explicitely control the length of your statements when generating them. In your sample you could code your program to create the follwoing lines:
tot = d1 + d2 + ........ + d8.
tot = tot + d9 + d100 ...... + d150.
tot = tot + d151 ..... d999.
And so on ....
Regards,
Volker
2009 May 08 8:44 AM
1) Can you modify this dynamically created program,
2) or can you change the program which creates this dynamic program?
2009 May 08 9:43 AM
thanks to all I solved by myself but I'll explain anyway what was wrong: the error was not due string too long but due a characters that was cut when filling the tab containing the code of the report dynamically created (my fault)(d'oh) and because the system is old I was thinking that doesn't like line command on more line as I wrote above and the error shown did not give me more informations.
thanks to all and sorry
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |