Shop OBEX P1 Docs P2 Docs Learn Events
PropBasic: INC — Parallax Forums

PropBasic: INC

VonSzarvasVonSzarvas Posts: 3,525
edited 2010-09-08 06:14 in Propeller 1
I tried this:

tmpa(7) = 196
SD_sectorsize = 33536
INC SD_sectorsize, tmpa(7)


BUT- The INC did not occur, the SD_sectorsize remains at 33536


Then I did this:
INC SD_sectorsize, 196

And it worked fine. SD_sectorsize = 33732


I could pass my array to a single byte... but should this work ?

Thanks!

Comments

  • BeanBean Posts: 8,129
    edited 2010-09-08 06:10
    Maxwin,
    Hmmm, yeah that should work. But it doesn't.
    I'll check into fixing that in the compiler.
    Thanks for finding that bug.
    For now just use this instead:
     SD_sectorsize = SD_sectorsize + tmpa(7)
    

    Bean
  • VonSzarvasVonSzarvas Posts: 3,525
    edited 2010-09-08 06:14
    yep, that code is a neater solution than passing to a byte first!
    Thanks.
Sign In or Register to comment.