Hi all

Thanx for all the usefull info over the years. Much apreciated.

Can someone please point me in the right direction.

I'm building a temp. logger using 16PIC877a - DS1307 - 24LC256, PBP 2.60C, MPLAB8.87 & ICD2/PicKit2
I come up with various errors listed below?????

Have I interpreted the Lookup command wrongly?

My code snip:- LOOKUP replace CASE SELECT

Read from RTC is converted from BCD to decimal beforehand
With the SELECT CASE - no errors

1107 ThirtyMinRec:

1108 LED1=0:LED2=1:LED3=1:LED4=0 ;Status LEDS
1109 ;Select Case DecMin
1110 ; Case 0 :00/60 Min check
1111 ; Gosub PromWrite ;Write to Ext EEPROM
1112 ; If DecMin > 0 Then ;Prevent writing to EEPROM for 1 Min
1113 ; StoreCalc = 0 ;reset bit to prevent above
1114 ; EndIf
1115 ; Return
1116 ; Case 30 ;30 min Check
1117 ; Gosub PromWrite ;Write to Ext EEPROM
1118 ; If DecMin > 30 Then ;Prevent writing to EEPROM for 1 Min
1119 ; StoreCalc = 0 ;reset bit to prevent above
1120 ; EndIf
1121 ; Return
1122 ; End Select
1123 ;StoreCalc = 0 ;Restet bit if something goes wrong
1124 ;Return

1125 Lookup2 decsec,[0,30],temp ;Replacement code for above
1126 If decsec > temp ;Temp var word
1127 Storecalc = 0 ;Reset bit
1128 return
1129 Endif

ERRORS

Executing: "C:\PBP\PBPMPLAB.BAT" -ampasmwin -k# -p16F877A "PIC877 Temp DataLogV1.bas"
Executing: "C:\PBP\PBPW.EXE" -ampasmwin -k# -p16F877A "PIC877 Temp DataLogV1.bas"
PICBASIC PRO(TM) Compiler 2.60C, (c) 1998, 2011 microEngineering Labs, Inc.
All Rights Reserved.
C:\16F877 TEMP CONTROL\PIC877 TEMP CONTROL\PIC877 TEMP DATALOGV1\PIC877 TEMP DATALOGV1.BAS ERROR Line 746: ID SixtyMinRec is not a LABEL.
C:\16F877 TEMP CONTROL\PIC877 TEMP CONTROL\PIC877 TEMP DATALOGV1\PIC877 TEMP DATALOGV1.BAS ERROR Line 1125: Expected ']'.
C:\16F877 TEMP CONTROL\PIC877 TEMP CONTROL\PIC877 TEMP DATALOGV1\PIC877 TEMP DATALOGV1.BAS ERROR Line 1154: Syntax error.
C:\16F877 TEMP CONTROL\PIC877 TEMP CONTROL\PIC877 TEMP DATALOGV1\PIC877 TEMP DATALOGV1.BAS ERROR Line 1162: ENDIF without a matching IF..THEN.
C:\16F877 TEMP CONTROL\PIC877 TEMP CONTROL\PIC877 TEMP DATALOGV1\PIC877 TEMP DATALOGV1.BAS ERROR Line 1163: ENDIF without a matching IF..THEN.1125: Syntax error
1125: Syntax error
Halting build on first failure as requested.
BUILD FAILED: Sat Jun 22 19:40:26 2013