Shop OBEX P1 Docs P2 Docs Learn Events
I WOULD LIKE TO GIVE X THE DEC VALUE OF yValue — Parallax Forums

I WOULD LIKE TO GIVE X THE DEC VALUE OF yValue

DENNISMDENNISM Posts: 1
edited 2005-11-03 21:51 in BASIC Stamp
DEAR SIR
I WOULD LIKE TO GIVE X THE DEC VALUE OF yValue in this routine example x=dec yValue but editor says expected a constant,
varible,unary operator, or ")" . please help! i need x to = the dec of yValue to jump out of loop .See attachment

Post Edited By Moderator (Chris Savage (Parallax)) : 11/3/2005 9:05:29 PM GMT

Comments

  • TiboTibo Posts: 81
    edited 2005-11-03 21:34
    Dennism, could you edit your post, change the file type from bsp to txt so its easier to open it in a browser ?
    Also, what kinda variable is x ?
    ++
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-11-03 21:51
    SDEC is only valid inside a DEGUG and SEROUT, when using the */ operator, the integer value is located in the most significant byte, so you need to have x = yValue.HIGHBYTE to do what you want.

    PS using */ returns a maximum value of 255.996, so the x < 8000 will always be true. Look at page 109 of the Stamp users manual for more info.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10

    Post Edited (Paul Baker) : 11/3/2005 9:55:38 PM GMT
Sign In or Register to comment.