Shop OBEX P1 Docs P2 Docs Learn Events
Variable misbehaves in BS2e module — Parallax Forums

Variable misbehaves in BS2e module

vaclav_salvaclav_sal Posts: 451
edited 2011-04-02 12:04 in BASIC Stamp
After further investigation / coding I need to say that the following advise may be incorrect!
I do not care or have time to prove it at this time.
My code works with each slot RAM usage as required,
Not a single slot matches any other as suggested.

My error was in using SRAM and RAM of different sizes.


Solved thanks to Dave at Parallax customer service.
My mistake - in BS2e there is only one RAM for variables - so they have to be declared same in each slot / module and in same sequence.
So the RAM map in each slot should display same usage.

I'll probably use alliases if necessary.
Vaclav










Believe it or not – I got this bug with a variable, basically a counter (local variable in a BS2e module) , which does not behave same way when different size is declared.
Right now it will only work when declared as Nib.
I am testing with range 10 to 14 , so it is OK.

But when declared as a Word or Byte (I'll need that later) – it seems to follow another variable – immediately after initialization.
The RAM map is OK and it compiles!

Any thoughts?
Vaclav











Addendum
Just tried another Word variable, also a counter, and it does not work either!
Time to call Parallax.

Comments

  • dandreaedandreae Posts: 1,375
    edited 2011-04-01 06:43
    Can you attach your code? This will help us determine what's going on.

    Thanks,

    Dave
  • vaclav_salvaclav_sal Posts: 451
    edited 2011-04-01 08:10
    Dave,
    I just send an e-mail to support.It has the code attached I would like to send you the debug trace. Expect an e-mail shortly.
  • ercoerco Posts: 20,256
    edited 2011-04-01 20:06
    Surely it's the code misbehavin' and not the Stamp. Please follow up with the official verdict.
  • vaclav_salvaclav_sal Posts: 451
    edited 2011-04-02 12:04
    Erco,
    see the original post for update.
    Vaclav
Sign In or Register to comment.