Things are progressing well with the extension of my project but I have hit a bit of a snag.
I have the the A/D working on PORTB.0 and I can do all the standard "Hello World" type stuff with the LCD. My problem occurs when I try to display the result of the A/D conversions.

The relevant code extract is as follows:

adval var byte ' Create adval to store result

ADCON0 = %11110001 ' Set clock divisor to INTOSC/4
' Set AN0, AN1 and AN2 as Analogue Input
' Turn on A/D converter
CM1CON0 = 0 ' Disable comparator
CM2CON0 = 0 ' Disable comparator
OPTION_REG.5 = 0 ' Set PORTC.5 as digital I/O port
TRISC = 0 ' Set PORTC as all outputs
TRISB = %00000111 ' Set PORTB.0, PORTB.1 and PORTB.3 as inputs

Pause 500 ' Wait .5 second

loop: ADCIN 0, adval ' Read channel 0 to adval

LCDOUT $fe, 1 ' Clear LCD
LCDOUT "Value: ", DEC adval ' Display the decimal value
Pause 100 ' Wait .1 second

Goto loop ' Do it forever
End

When I try to compile this program using MPLAB IDE I get the following error

Executing: "C:\PBP\PBPW.EXE" -ampasmwin -oq -z -p16F506 "ADCIN8 16F506.bas"
PICBASIC PRO(TM) Compiler 2.47, (c) 1998, 2006 microEngineering Labs, Inc.
All Rights Reserved.

ERROR: Macro LCDOUTCOUNT?C not found in macro file.
ERROR: Macro LCDOUTNUM?B not found in macro file.
ERROR: Macro LCDOUTDEC? not found in macro file.Halting build on first failure as requested.
BUILD FAILED: Mon Jan 17 21:22:24 2011

but when I change the LCDOUT statement to

LCDOUT "Value: ", #adval

everything works perfectly.
I was led to believe that the two statements are the same so why doesn't it work?
Frustratingly, LCDOUT "Value: ", DEC adval works perfectly when compiling fo 16F684 or 16F716 but not 16F506.

Can anyone shed some light on this?

The final program will use Darrel Taylor's Bargraph display and my initial compile resulted in a host of LCDOUT error statements (DEC, REP issues) so I need to get to the bottom of this problem. (BTW, I can get Darrel's bargraph working beautifully on 16F684, 16F716 etc).

Cheers
Barry