Project

General

Profile

Feature #2047

field references in procedures without explicit buffer scope

Added by Constantin Asofiei about 11 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Start date:
02/25/2013
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD

ca_upd20130225a.zip (39.6 KB) Constantin Asofiei, 02/25/2013 11:01 AM

field_in_proc_scope.p Magnifier (104 Bytes) Constantin Asofiei, 02/25/2013 11:01 AM

ca_upd20130225b.zip (39.9 KB) Constantin Asofiei, 02/25/2013 01:32 PM


Related issues

Related to Bugs - Bug #1706: temp-table buffer scoping New

History

#1 Updated by Constantin Asofiei about 11 years ago

  • Target version set to Milestone 4

Looks like 4GL allows a buffer reference in a procedure, without having its scope set, as it inherits the buffer scope from the caller.

def var ch as char
procedure proc0.
   message book.book-title. /* shows the first title */
end.

find first book.
run proc0.

In this case, field references need to trigger a buffer registration, but I think only if one is not explicitly set.

#2 Updated by Constantin Asofiei about 11 years ago

This one is related to #1706. Looking at the perm buffer scoping from some compile listings from 4GL v9 and new ones generated on lindev01, there are no differences related to buf scoping (just file format/date stamp diffs).

#3 Updated by Constantin Asofiei about 11 years ago

Fix attempt for scope computation for fields in procedures/functions without explicit buffer scope created by other statement.

#4 Updated by Greg Shah about 11 years ago

I'm a little nervous about the change BUT I think it should be OK. I'm going to put it into conversion testing now.

#5 Updated by Constantin Asofiei about 11 years ago

I had a copy-paste error in SymbolResolver, I saved bufname instead of dbname in the "dbname" annotation. I'm running a conversion on my system too, I'll let you know the results.

#6 Updated by Constantin Asofiei about 11 years ago

The conversion has finished and the generated sources look good to me (only some reordering in openScope and buffer instance definition)

#7 Updated by Greg Shah about 11 years ago

Check it in and distribute it.

#8 Updated by Constantin Asofiei about 11 years ago

Committed to bzr revision 10204.

#9 Updated by Greg Shah about 11 years ago

  • Status changed from WIP to Closed

#10 Updated by Eric Faulhaber about 11 years ago

  • % Done changed from 0 to 100

#11 Updated by Greg Shah over 7 years ago

  • Target version changed from Milestone 4 to Conversion Support for Server Features

Also available in: Atom PDF