Jerson,

Yes, I already use a lot of sub-routines.

Melanie,

Using the BANK0 next to the variables declarations didn't help. I think that I read somewhere that newer versions of PBP already take care of this BANK issue. However, moving sub-routines to the beginning of the program after the variables declaration help me free about 60 words.

Ioannis,

The link that you provided was very helpfull. I used in my program a lot of (with different variables all the time)

Code:
IF (VAR_0=0) AND (VAR_1=1) AND (VAR_2=2) AND (VAR_3=3) THEN
   ........
ENDIF

IF (VAR_0=0) OR (VAR_1=1) OR (VAR_2=2) OR (VAR_3=3) THEN
   ........
ENDIF
And according to the link that you posted you can save a lot of space by changing the above lines by

Code:
IF (VAR_0=0) THEN
   IF (VAR_1=1) THEN
      IF (VAR_2=2) THEN
         IF (VAR_3=3) THEN
            ........
         ENDIF
      ENDIF
   ENDIF
ENDIF

IF (VAR_0=0) THEN ........
IF (VAR_1=1) THEN ........
IF (VAR_2=2) THEN ........
IF (VAR_3=3) THEN ........


Well by using this technique I was able to go from 8118 words down to 7216 words. Enough to do what I need to finish my project. It would be nice to see an improved version of this link here in this forum. I'm sure that there are many techniques and tricks to save a lot of space that we don't know about.

Robert