Menu

Setting a word with [WORD] misbehaves.

bell
2007-03-30
2013-05-30
  • bell

    bell - 2007-03-30

    Being new with GCBasic I've depended a bit on the helpfile and in the chapter about setting variables there's an example that looks like this:

    Temp = LargeVar / 5 [WORD] 'Note the use of [WORD] to ensure that the calculation is performed correctly

    Well... wanting to be absolutely sure I wiped my word variable I wrote this in my code:

    Dim Myvar as word
    Myvar = 0x0000 [WORD]

    That should do it, right? Well... Guess what Mr.Assembler says...
    movlw    123
    movwf    MYVAR_H
    movlw    214
    movwf    MYVAR

    Just doing Myvar = 0 works much better...

    Is it supposed to do this?

     
    • Hugh Considine

      Hugh Considine - 2007-03-30

      That isn't what GCBASIC is supposed to do! It's fixed in http://gcbasic.sourceforge.net/newfiles/update.zip, as is the other bug you posted.

       
      • bell

        bell - 2007-03-30

        Excellent! I've tested it and now works as expected.

        Thanks!

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.