Shop OBEX P1 Docs P2 Docs Learn Events
@Bean, issue with word/byte modifiers — Parallax Forums

@Bean, issue with word/byte modifiers

Peter VerkaikPeter Verkaik Posts: 3,956
edited 2009-04-01 15:39 in General Discussion
Bean,

In the attached program I have two functions
that take 4 arguments but the first arg is a word,
so they take 5 bytes.

STOAB··FUNC·1,5,word,byte,byte,byte

This generates an error.
For now I use
STOAB··FUNC·1,5 ',word,byte,byte,byte
and split the first arg, but I rather like
SXB to promote a byte to·a word
for the first arg.

regards peter

Comments

  • BeanBean Posts: 8,129
    edited 2009-03-07 15:29
    Peter,
    You need to declare both the min and max parameter count. Even if it is the same.

    So "STOAB FUNC 1,5,5,WORD,BYTE,BYTE,BYTE" should work.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There is a fine line between arrogance and confidence. Make sure you don't cross it...

    ·
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-03-07 16:50
    That doesn't work. Generates Invalid Parameter "5"

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-03-08 14:36
    Bean,
    I read in the What's new document that for functions the
    return type should also be specified (although this is redundant)
    so I tried

    STOAB FUNC 1,5,5,BYTE,WORD,BYTE,BYTE,BYTE

    Still getting errors.

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-03-25 11:59
    Bean,
    Has this issue been resolved?

    regards peter
  • BeanBean Posts: 8,129
    edited 2009-03-25 14:14
    Peter,
    Oops, I missed that.
    I will post a fix tomorrow.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There is a fine line between arrogance and confidence. Make sure you don't cross it...

    ·
  • BeanBean Posts: 8,129
    edited 2009-03-26 13:38
    Peter,
    I have posted version 2.00.17 that should fix the bug.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There is a fine line between arrogance and confidence. Make sure you don't cross it...

    ·
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-03-26 14:09
    Thanks Bean.
    Seems to work now.

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-03-28 22:41
    Bean,

    Although it works for FUNC, there is still an issue with SUB.

    dvpDAC_SetValue SUB 5,5,byte,word,word

    gives error "Invalid parameter 5"

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-03-31 19:41
    Hi Bean,
    In case you missed my above reply.

    regards peter
  • BeanBean Posts: 8,129
    edited 2009-04-01 12:37
    Peter,
    Thanks... I had missed your 3/28 post.
    I'll fix that ASAP.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There is a fine line between arrogance and confidence. Make sure you don't cross it...

    ·
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-04-01 15:39
    Thanks Bean for uploading a new version (r19).
    Seems to work ok.

    regards peter
Sign In or Register to comment.