Skip to content

Commit a25fcd6

Browse files
committed
Use class attributes for lbound and ubound flags
1 parent e1068d3 commit a25fcd6

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

api/symboltable.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,6 @@ def declare_array(self, id_, lineno, type_, bounds, default_value=None, addr=Non
762762
entry.default_value = default_value
763763
entry.callable = True
764764
entry.class_ = CLASS.array
765-
entry.lbound_used = entry.ubound_used = False # Flag to true when LBOUND/UBOUND used somewhere in the code
766765
entry.addr = addr
767766

768767
__DEBUG__('Entry %s declared with class %s at scope %i' % (id_, CLASS.to_string(entry.class_),

symbols/vararray.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
class SymbolVARARRAY(SymbolVAR):
2323
""" This class expands VAR top denote Array Variables
2424
"""
25+
lbound_used = False # True if LBound has been used on this array
26+
ubound_used = False # True if UBound has been used on this array
27+
2528
def __init__(self, varname, bounds, lineno, offset=None, type_=None):
2629
super(SymbolVARARRAY, self).__init__(varname, lineno, offset=offset, type_=type_, class_=CLASS.array)
2730
self.bounds = bounds

0 commit comments

Comments
 (0)