I would like to report a problem with the compiler:
When I process a line with an "If" followed by a comment that also contains an "If" gives me the following error:
Compiler Version (YYYY-MM-DD): 0.98.04 2018-10-20 (Windows 32 bit) Program Memory: 2780/4096 words (67,87%) RAM: 242/368 bytes (65,76%) Chip: 16F88
WARNINGs / ERRORs reported by Great Cow BASIC (if Syntax Error, doubleclick on the errormessage below) <<<
Anemometro.gcb (707): Syntax Error: Mutliple IFs not permitted. .
This is the code, the error is on the second line.
Cr_CrcData = FnLSR(Cr_CrcData, 1)
If Cr_TestBit = 1 Then ' If TEST Bit NOT Set, JUSTSHIFT Crc
Crc = Crc # 0x18
End If ' If Set, ACCOUNT For EXOR FEEDBACK
Crc = FnLSR(Crc, 1)
If I remove the comment, the error is not generated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Code:
Cr_CrcData = FnLSR(Cr_CrcData, 1)
If Cr_TestBit = 1 Then ' If TEST Bit NOT Set, JUSTSHIFT Crc
Crc = Crc # 0x18
End If ' If Set, ACCOUNT For EXOR FEEDBACK
Crc = FnLSR(Crc, 1)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The message Syntax Error: Mutliple IFs not permitted. . only comes from preprocess.awk posted recently (28.01.19). I dont think that message can come from elsewhere.
Please check the date of the file C:\GCB@Syn\G+Stools\preprocess.awk
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
print "Great Cow BASIC preprocessor (v0.98.04)"
#24.09.2016 'revised to correct detection error
#29.05.2017 'Remove ExamineElseError. Removed this check at v0.98.04 as we now support if-then-else-if-end_if
#29.01.2019 'Remove ExamineElseError. Removed this check at v0.98.05 as we now newed to a smart ELSE IF check
#30.01.2019 'Remove errors in processing rules.
--> 30/01/2019
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Delete you code. I cannot reproduce. My total guess - you downloaded the preprocessor during the creation of the update and you may not have updated when i posted a final version.
I would like to report a problem with the compiler:
When I process a line with an "If" followed by a comment that also contains an "If" gives me the following error:
Compiler Version (YYYY-MM-DD): 0.98.04 2018-10-20 (Windows 32 bit) Program Memory: 2780/4096 words (67,87%) RAM: 242/368 bytes (65,76%) Chip: 16F88
Cr_CrcData = FnLSR(Cr_CrcData, 1) If Cr_TestBit = 1 Then ' If TEST Bit NOT Set, JUSTSHIFT Crc Crc = Crc # 0x18 End If ' If Set, ACCOUNT For EXOR FEEDBACK Crc = FnLSR(Crc, 1)
If I remove the comment, the error is not generated.
Code:
Cr_CrcData = FnLSR(Cr_CrcData, 1)
If Cr_TestBit = 1 Then ' If TEST Bit NOT Set, JUSTSHIFT Crc
Crc = Crc # 0x18
End If ' If Set, ACCOUNT For EXOR FEEDBACK
Crc = FnLSR(Crc, 1)
hi,
is this using the new preprocessor? downloaded from a post very recently? This may be a very important piece of information.
I'll check right away and let you know
Compiler Version (YYYY-MM-DD): 0.98.04 2018-10-20 (Windows 32 bit)
Not what I need.
Did you download any code from this forum? and, update your configuration? Like an AWK file in the GS+Tools directory?
No is original from installation program
I try to download preprocess.avk ?
Last edit: jackjames 2019-02-04
No this is not the case.
The message Syntax Error: Mutliple IFs not permitted. . only comes from preprocess.awk posted recently (28.01.19). I dont think that message can come from elsewhere.
Please check the date of the file C:\GCB@Syn\G+Stools\preprocess.awk
--> 30/01/2019
As I thought.
Anyway. I cannot reproduce here.
Please attach your actual source and that AWK file please. As attachments.
OK
And the source code with the error. I cannot reproduce from the code pasted above.
Source code
.h is missing
I forgot one important file
Delete you code. I cannot reproduce. My total guess - you downloaded the preprocessor during the creation of the update and you may not have updated when i posted a final version.
I just posted to SVN. https://sourceforge.net/p/gcbasic/code/878/tree/utils/@Syn/preprocess.awk
Update yours please. Test.
Problem solved !
As always you have a great patience and availability.
THANKS !
:-)
Cheers