Project

General

Profile

Bug #4227

FWD refuses to compile the access to the 'colon' widget attribute

Added by Vladimir Tsichevski almost 5 years ago. Updated almost 5 years ago.

Status:
New
Priority:
Low
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version:

History

#1 Updated by Vladimir Tsichevski almost 5 years ago

The following code will not compile in FWD:

define variable num as integer.
display num with frame f0.
num = num:colon.

With this output:

     [java] ./abl/hello.p:4:11: unexpected token: colon
     [java]     at com.goldencode.p2j.uast.ProgressParser.attribute_or_method(ProgressParser.java:51829)
     [java]     at com.goldencode.p2j.uast.ProgressParser.chained_object_members(ProgressParser.java:21350)
     [java]     at com.goldencode.p2j.uast.ProgressParser.un_type(ProgressParser.java:56622)
     [java]     at com.goldencode.p2j.uast.ProgressParser.prod_expr(ProgressParser.java:56489)
...

In Progress the colon attribute cannot be read or write in runtime, but the code is compilable. In FWD it won't compile.

Comment by GES:

As far as I know, there is no such attribute.  The colon keyword is only used in certain static phrases but is not a handle-based attribute.  In the 4GL, perhaps they treat it differently from random text but it won't work at runtime as you note.  Perhaps they allow any non-reserved keyword to be matched there as an invalid attribute.
In FWD, this would be handled the same way that any attribute that we don't support at parsing time. In this case, we would have to implement a not-an-attribute behavior that allows conversion but fails at runtime.

Also available in: Atom PDF