Feature #1885
fix and add necessary format string support
100%
Subtasks
History
#1 Updated by Constantin Asofiei about 11 years ago
There is at least one format string problem in the server. Looks like PUT fields can have a dynamic format, and any expression can be used:
def stream rpt. def var ch as char. find first book. output stream rpt to put_test.txt. PUT STREAM rpt book.book-title FORMAT "x(15)" + " ". /* this is a complex expression which gets evaluated at runtime */ ch = "x(10)". PUT STREAM rpt book.book-title FORMAT ch. /* this must be the ch var not the "ch" string. ch is evaluated at runtime and if is not a valid format, some message is shown */ output stream rpt close.
I guess I'm taking this at least to fix the put field's format. I'll add another task to track the conversion support for this.
#2 Updated by Constantin Asofiei about 11 years ago
- File ca_upd20130305g.zip added
This fixes the conversion problem, still need to expand PutField c'tors to accept character for the format... or, can we just call "toStringMessage()" for the expression, so we will not duplicate all the c'tors which accept String format ?
#3 Updated by Greg Shah about 11 years ago
Yes, using toStringMessage() is a great idea.
#4 Updated by Constantin Asofiei about 11 years ago
- File ca_upd20130306a.zip added
This version emits the toStringMessage in case the format is a complex expression, for PUT field. Also, adds a TODO in PutField class, to validate the format.
#5 Updated by Constantin Asofiei about 11 years ago
- File deleted (
ca_upd20130306a.zip)
#6 Updated by Constantin Asofiei about 11 years ago
- File ca_upd20130306a.zip added
Correct version of progress.g
#7 Updated by Constantin Asofiei about 11 years ago
0306a.zip has passed conversion regression testing (no changes in generated sources).
#8 Updated by Constantin Asofiei about 11 years ago
0306a.zip was Committed to bzr revision 10252.
#9 Updated by Greg Shah almost 11 years ago
- Target version changed from Milestone 7 to Milestone 11
#10 Updated by Greg Shah almost 10 years ago
- Status changed from New to Closed
#11 Updated by Greg Shah over 7 years ago
- Target version changed from Milestone 11 to Cleanup and Stablization for Server Features