small piece of code that break folding schema and change moving spaces and *

Fixus Fx
  • Fixus Fx
    Fixus Fx

    Hi. I use NP++ from many years and send my contribute for CncTex language that we use here.
    Now I know many thing about Syntax Highlighting and Folding but have
    many problems with that small piece of code that break folding schema
    and change folding signs(structure) on left as I simply go to edit one of this lines
    simply adding a space at the end of lines(not all) can correct folding structure but
    as I return to my work, this piece of code relost folding structure and breack my file of more then 10000 lines not breakable in more files for that CNC language.

    Change when add spaces and moving "*" in many whay.. why?

    Thanks, -Fixus971

    In folding rules I write "#IF 1" and "#ENDIF" and havent problems before that.
    ";" for comments

    #IF 1  ;__Par Update Plotter
      IF fParUpdatePl                 ;aggiorna impostazioni Plotters
        fParUpdatePl = 0
       ;__Calc % da applicare per i Mov Rapidi:  var v limitate a 2'000'000
        vPlSaldRotVelPerc  =(vPlRotRapVel * 100) /(FINFO kFInfoVelMax  kPlSaldRot)
        vPlSaldRotAccPerc  =(vPlRotRapAcc *1000) /(FINFO kFInfoAccMax  kPlSaldRot) *100 
        vPlSaldRotJerkPerc =(vPlRotRapJerk*1000) /(FINFO kFInfoJerkMax kPlSaldRot) *100 
        vPlSaldCurVelPerc  =(vPlCurRapVel * 100) /(FINFO kFInfoVelMax  kPlSaldCur)
        vPlSaldCurAccPerc  =(vPlCurRapAcc *1000) /(FINFO kFInfoAccMax  kPlSaldCur) *100 
        vPlSaldCurJerkPerc =(vPlCurRapJerk*1000) /(FINFO kFInfoJerkMax kPlSaldCur) *100 
        vPlTaglRotVelPerc  =(vPlRotRapVel * 100) /(FINFO kFInfoVelMax  kPlTaglRot)
        vPlTaglRotAccPerc  =(vPlRotRapAcc *1000) /(FINFO kFInfoAccMax  kPlTaglRot) *100 
        vPlTaglRotJerkPerc =(vPlRotRapJerk*1000) /(FINFO kFInfoJerkMax kPlTaglRot) *100 
        vPlTaglCurVelPerc  =(vPlCurRapVel * 100) /(FINFO kFInfoVelMax  kPlTaglCur)
        vPlTaglCurAccPerc  =(vPlCurRapAcc *1000) /(FINFO kFInfoAccMax  kPlTaglCur) *100 
        vPlTaglCurJerkPerc =(vPlCurRapJerk*1000) /(FINFO kFInfoJerkMax kPlTaglCur) *100 
     ;NB: agginto 1 spazio dopo *100 per evitare caos #IF--#ENDIF 
    #ENDIF  ;--Par Update Plotter
  • Fixus Fx
    Fixus Fx

    Finally I found the piece of code that break folding structure but dont understand why..
    All structure return to work after adding one space at the end of lines that simply ending with ")"
    Please tell me why I have this problem only in this lines.

    Now I reduced code to this piece of code into a simle line:
    " ="
    This break folding structure and..
    " = " correct all

    I swapped this piece of code with previous block(fold)
    and problem go away!
    Then move all code to original position (without using undo)
    and all work well.

    So the problem can be a hidden char in that zone of code?

    I receck tomorrow if all continue to work.