Shop OBEX P1 Docs P2 Docs Learn Events
Programming advice (no need for actually programming help) — Parallax Forums

Programming advice (no need for actually programming help)

Bobb FwedBobb Fwed Posts: 1,119
edited 2011-01-25 21:09 in Propeller 1
So I have an object I am working on, and in the object I use the simple numbers object, but I only use one method out of it.

So here's the question: do I copy the method I use into my object (and cite it) and save the object size by 100 or so longs of programming space or leave the object in there, and if the person using my object is already using simple numbers, save them a dozen or so longs?

Comments

  • JonnyMacJonnyMac Posts: 9,234
    edited 2011-01-25 17:27
    If you compile with BST I believe it will remove unused methods -- will allow you to write as desired without cobbling or cut-and-paste.
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2011-01-25 17:37
    JonnyMac wrote: »
    If you compile with BST I believe it will remove unused methods -- will allow you to write as desired without cobbling or cut-and-paste.
    One solution, but that is on the users' end, but I guess that's a vote for leaving it as an intact object.
  • AJMAJM Posts: 171
    edited 2011-01-25 17:39
    JonnyMac is correct. The option is available in Tools--> Compiler Preferences--> Optimizations
  • MagIO2MagIO2 Posts: 2,243
    edited 2011-01-25 21:09
    I would mention this in the description of your object, so that the ones who are in the need of RAM can easily find what they can get rid off.
Sign In or Register to comment.