Community
    • 登入

    Syntax coloration failure in a T-SQL file with .sql extension

    已排程 已置頂 已鎖定 已移動 General Discussion
    1 貼文 1 Posters 1.0k 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Martin SpenceM
      Martin Spence
      最後由 編輯

      A single backslash at the end of a T-SQL string literal, delimited with single quotes as usual in that language, causes subsequent syntax coloration in the file to fail.
      Example:

      – TEST.SQL
      DECLARE @FOO VARCHAR(10) = ‘’ – Syntax coloration fails after backslash before closing single quote, which is valid in T-SQL. Backslash does not indicate an escaped character.
      – Syntax coloration fails because algorithm thinks a string literal is still open.
      DECLARE @FI INT = 0

      1 條回覆 最後回覆 回覆 引用 0
      • 第一個貼文
        最後的貼文
      The Community of users of the Notepad++ text editor.
      Powered by NodeBB | Contributors