Local labels and DataSection
-
- Addict
- Posts: 1520
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Local labels and DataSection
In my opinion, if DataSection located in procedure, labels have to be local, not global.
Re: Local labels and DataSection
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.
Labels inside procedures are local, but labels inside DataSections(no matter where defined) are global.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
-
- Addict
- Posts: 1520
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: Local labels and DataSection
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.
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
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.