Menu

"If" problem: Resolved

jackjames
2019-02-04
2019-03-26
  • jackjames

    jackjames - 2019-02-04

    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.

     
  • jackjames

    jackjames - 2019-02-04

    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)

     
    • Anobium

      Anobium - 2019-02-04

      hi,

      is this using the new preprocessor? downloaded from a post very recently? This may be a very important piece of information.

       
  • jackjames

    jackjames - 2019-02-04

    I'll check right away and let you know

     
  • jackjames

    jackjames - 2019-02-04

    Compiler Version (YYYY-MM-DD): 0.98.04 2018-10-20 (Windows 32 bit)

     
    • Anobium

      Anobium - 2019-02-04

      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?

       
  • jackjames

    jackjames - 2019-02-04

    No is original from installation program
    I try to download preprocess.avk ?

     

    Last edit: jackjames 2019-02-04
    • Anobium

      Anobium - 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

       
  • jackjames

    jackjames - 2019-02-04
     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

     
    • Anobium

      Anobium - 2019-02-04

      As I thought.

      Anyway. I cannot reproduce here.

      Please attach your actual source and that AWK file please. As attachments.

       
  • jackjames

    jackjames - 2019-02-04

    OK

     
    • Anobium

      Anobium - 2019-02-04

      And the source code with the error. I cannot reproduce from the code pasted above.

       
  • jackjames

    jackjames - 2019-02-04

    Source code

     
    • Anobium

      Anobium - 2019-02-04

      .h is missing

       
  • jackjames

    jackjames - 2019-02-04

    I forgot one important file

     
  • Anobium

    Anobium - 2019-02-04

    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.

     
  • jackjames

    jackjames - 2019-02-04

    Problem solved !
    As always you have a great patience and availability.

    THANKS !

     
    • Anobium

      Anobium - 2019-02-04

      :-)

      Cheers

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.