Menu

#5 WinInc redefine "this"?

pending-wont-fix
nobody
None
5
2013-04-09
2013-03-07
Excalibur
No

Build with masm32 v11
offset ThisByte
code.asm: 21 lines, 2 passes, 62 ms, 0 warnings, 0 errors

Build with WinInc v2.06
offset this byte
code.asm(18) : error A2206:missing operator in expression
code.asm(18) : error A2114:INVOKE argument type mismatch : argument : 2

Both masm and jwasm have the exactly same behavior.

Discussion

  • Excalibur

    Excalibur - 2013-03-07
     
  • japheth

    japheth - 2013-03-07

    Well, kind of. In file winasm.inc, you'll find:

    ; option nokeyword:<short>
    option nokeyword:<this>
    option nokeyword:<name> ;v2.04: added (NAME is a nop)

    that is, "this" is changed to "undefined".

    Why? Because the THIS operator is somewhat ancient, not really needed in Masm v6-syntax. You should virtually always be able to replace it by the LABEL directive.

     
  • japheth

    japheth - 2013-04-09
    • status: open --> pending-wont-fix