Next: , Previous: M2 Checks, Up: Modula-2


15.4.7.8 The Scope Operators :: and .

There are a few subtle differences between the Modula-2 scope operator (.) and the gdb scope operator (::). The two have similar syntax:

     
     module . id
     scope :: id

where scope is the name of a module or a procedure, module the name of a module, and id is any declared identifier within your program, except another module.

Using the :: operator makes gdb search the scope specified by scope for the identifier id. If it is not found in the specified scope, then gdb searches all scopes enclosing the one specified by scope.

Using the . operator makes gdb search the current scope for the identifier specified by id that was imported from the definition module specified by module. With this operator, it is an error if the identifier id was not imported from definition module module, or if id is not an identifier in module.