Project

General

Profile

Feature #1885

fix and add necessary format string support

Added by Greg Shah over 11 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
03/05/2013
Due date:
09/04/2013
% Done:

100%

Estimated time:
(Total: 40.00 h)
billable:
No
vendor_id:
GCD

ca_upd20130305g.zip (267 KB) Constantin Asofiei, 03/05/2013 05:04 PM

ca_upd20130306a.zip (281 KB) Constantin Asofiei, 03/06/2013 02:32 AM


Subtasks

Feature #2079: add missing conversion support for format stringClosedConstantin Asofiei

Bug #2147: fix any runtime issues with format strings (server project)ClosedEugenie Lyzenko

History

#1 Updated by Constantin Asofiei almost 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 almost 11 years ago

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 almost 11 years ago

Yes, using toStringMessage() is a great idea.

#4 Updated by Constantin Asofiei almost 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 almost 11 years ago

  • File deleted (ca_upd20130306a.zip)

#6 Updated by Constantin Asofiei almost 11 years ago

Correct version of progress.g

#7 Updated by Constantin Asofiei almost 11 years ago

0306a.zip has passed conversion regression testing (no changes in generated sources).

#8 Updated by Constantin Asofiei almost 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

Also available in: Atom PDF