PDA

View Full Version : Codespace Saving Tip... Don't mix Words and Bytes



Melanie
- 18th June 2004, 10:23
Stuck on Program Space?
Playing with Words and Bytes?
Then Don't mix them in the same statement...

ByteA var Byte
WordA var Word

This example...

If WordA=ByteA then goto MyBirthdayParty

uses considerably more codespace than this example...

If WordA.Lowbyte=ByteA then goto MyBirthdayParty

So, if you must compare Byte content against Word content, by using the Highbyte or Lowbyte extension appropriately, you can save significant amounts of Codespace.

Melanie