|Dave, | |>$LOCALSTART <--- New construct |> Var1 = "NewTest" |> PRINT "NewValue of Var1 = ":Var1 |>$LOCALEND | |when you implemented this, did it add new opcodes or change the object |format, |or were the objects still backwards compatible with previous versions and |the $LOCALxxx directives just affecting the compiler? | |(or between the lines: if I contact IBM and suggest they retrive this code |and add it to UV, do you think I will still be able to copy object from |UV10.x to UV9.x) | |thanks,
No, this was not a new opcode, but rather, a construct within the lexical analyzer. So yes, this would be perfectly portable, at least the object code would be... at least insofar as any other object code would be. Obviously, the source code would fail to compile...
Essentially, during a pre-pass phase of the compilation, the lexer will examine the tokens to determine if the referenced value is a variable or not. It will then determine whether the variable has been seen or not. If so, it returns that entry in the vartab slot (where you see in the 'VLIST ... R' listing the slot values.
The change basically established scope levels inside the analyzer to disambiguate between variables that were local/global scope. Thus, in the construct:
A=1 $LOCALSTART A=2 $LOCALEND
The lexer would see the 'A', determine it was a LVALUE (variable), and assign it to slot one. The parser would then construct the opcode using the "move" opcode, using slot 1.
The second statement, however, would be within a local scope, so the lexer would mark the boundary in the vartab table, and again, upon determining that 'A' was an LVALUE(variable), it would look up the value, find that it wasn't in the vartab (at least within the local scope range), and assign it a new slot.
Effectively, this treats it as if you named it 'A' and 'Local1A', as the actual run-time component doesn't care. Now, there were also mechanisms to mark certain variables as being global scope as well, that I haven't discussed.
Now, as to whether IBM could get the code and put it in... the answer is most likely NO. IBM and Ascential are separate organizations, and our code streams are separate and effectively protected.
Now, if Susie/Helen were to give me a call, I could probably tell them exactly how to do this.. Hey... didn't this post already do that :-)
Dave
======================================================================== David T. Meeks || "All my life I'm taken by surprise Architect, Technology Office || I'm someone's waste of time Ascential Software || Now I walk a balanced line [EMAIL PROTECTED] || and step into tomorrow" - IQ ======================================================================== -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users