Page 1 of 1

Local labels and DataSection

Posted: Thu Oct 31, 2013 6:00 pm
by User_Russian
In my opinion, if DataSection located in procedure, labels have to be local, not global.

Re: Local labels and DataSection

Posted: Thu Oct 31, 2013 8:58 pm
by skywalk
The same happens if you define a Structure inside a Procedure. Structures are global.
Labels inside procedures are local, but labels inside DataSections(no matter where defined) are global.

Re: Local labels and DataSection

Posted: Thu Oct 31, 2013 9:20 pm
by User_Russian
If DataSections, is inside a procedure, it implies that the contents need only within the procedure. It means there is no need for global label.

By the way, a good idea. If the structure constant, or interface, etc., are declared inside a procedure, it suggests that they are necessary only in this procedure and the procedure to be limited to them namespace.

Re: Local labels and DataSection

Posted: Sat Nov 02, 2013 6:03 am
by TheoGott
The compiler could transparently (internally) add ad [procedurename_] to the datasection-label. This way it could be treated as global while beeing local from standpoint of the programmer. He could use a Macro, or could always use the same Label Name in different procedures or global.