Unnecessary Escapment Flagged but shouldn't be flagged

Posted on
  • A yellow triangle warning appears in WebIDE that flags the escapement.

    //unnecessaryEscapment.js
    //PICO v 1x86
    
    // A is flagged as unecessary escapment
    // with a yellow triangle in the right side of WEBIDE
    var A="\x31";
    var B="x31";
    
    console.log("A= ",A);
    console.log("B= ",B);
    

    The output:

    >echo(0);
    A=  1
    B=  x31
    =undefined
    > 
    
  • Yes, it's flagged because there was no need to use "\x31" when you could have just typed "1"

    Why do you think it shouldn't be flagged?

  • Yes it goes away in this one. A matter of taste I suppose.

    //unnecessaryEscapment.js
    //PICO v 1x86
    
    // A is flagged as unecessary escapment
    // with a yellow triangle in the right side of WEBIDE
    var A="\xdb";
    var B="xdb";
    
    console.log("A= ",A);
    console.log("B= ",B);
    >echo(0);
    A=  Û
    B=  xdb
    =undefined
    > 
    
  • Yes - In a way I could research and add more options to the Web IDE for these kind of things, but to be honest if you're getting upset about escaped hex in strings, it's probably not that hard for you to download the IDE from Git and tweak the relevant setting or add an option yourself :)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Unnecessary Escapment Flagged but shouldn't be flagged

Posted by Avatar for ClearMemory041063 @ClearMemory041063

Actions