Shop OBEX P1 Docs P2 Docs Learn Events
BSp programming questions.... — Parallax Forums

BSp programming questions....

denodeno Posts: 242
edited 2005-06-17 17:10 in BASIC Stamp
Hello again fellow stampers...

A couple of questions please...

First is there anyway to make variables, constants, and sub routines global using the BS2p and different programming slots, or do you have to re-list everything again in each slot? The reason I ask is, I have run out of room in SLOT 1 and have to continue the program in SLOT 2. I do know about having to call the different SLOTS as needed however.

Second question is: Which takes up less programming room in eeprom. (IF, ELSEIF, ENDIF) or (SELECT, CASE, ENDSELECT) routines?

Thanks for reading..Deno

Post Edited (deno) : 6/16/2005 1:51:20 AM GMT

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-06-16 05:23
    Yes, each of the program slots are in fact independent, so you must copy the declarations from one to another if you want them to match up.

    IF-THEN-ELSE generally uses less EE space for tokens than SELECT-CASE, but -- depending on the program logic -- could become quite unwieldy and absolutely inelegant at high level.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • denodeno Posts: 242
    edited 2005-06-16 11:09
    Thanks Jon for the reply...off I go to shovel some code into another program slot...

    Deno
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2005-06-17 17:10
    Hi Deno,

    This URL might have something of interest for you, for how PBASIC 2.5 sytax works in relation to the more primitive PBASIC 2.0, and optimiation.

    http://www.emesystems.com/BS2pbasic25.htm

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
Sign In or Register to comment.