Forum Post: Peculiar Resolution

  • Thread starter Thread starter Thomas Mercer-Hursh
  • Start date Start date
Status
Not open for further replies.
T

Thomas Mercer-Hursh

Guest
I have a code fragment which goes like this: define buffer bfCompileSubUnit for CompileSubUnit. create bfCompileSubUnit. assign bfCompileSubUnit.chID = guid bfCompileSubUnit.chName = "" bfCompileSubUnit.chType = "ProgramRoot" bfCompileSubUnit.chCompileUnitID = chCompileUnitID . The *intention* was that chCompileUnitID was a variable defined at the class level which would get assigned from the current CompileUnit.chID when that record was created. However, it turned out in this particular program that not only was this assignment not done, but the variable was never defined. So, why did this compile? From the XREF, it appears that it resolved chCompileUnitID as the field in CompileSubUnit, i.e., assigning a field to itself. Seems peculiar.

Continue reading...
 
Status
Not open for further replies.
Back
Top