Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Testing a variable within a range
#4
Actually, I've been doing some refactoring and gave the IF...THEN IF...THEN a whirl instead of using ANDs and they are about 10 bytes cheaper.

So instead of doing this:

Code:
if eventA = 0 and eventB = 0 then


Do this instead:

Code:
if eventA = 0 then if eventB = 0 then

If have a lot of ANDs in my code! I'm sure I could save quite a lot of memory here!  Smile

Steve

P.S. Would it be an idea to set up a tips and tricks bit of your forum? Such things could help us write faster, smaller code, even if it were not the most logical to read back.
Reply


Messages In This Thread
RE: Testing a variable within a range - by boriel - 01-28-2022, 11:19 AM
RE: Testing a variable within a range - by worcestersource - 02-06-2022, 10:37 PM
RE: Testing a variable within a range - by boriel - 03-13-2022, 11:38 AM
RE: Testing a variable within a range - by boriel - 03-14-2022, 08:50 AM
RE: Testing a variable within a range - by boriel - 03-14-2022, 09:49 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)