• Wed 2020.04.01

    am reposting here as no response within other buried post

    see post #10 #13 #16 Technique needed to notify of low memory condition during runtime



    Just a simple request to cut-n-paste or just file upload to confirm visually the response in the WebIDE console. Looking for blank lines to be inserted between lines of text when outputting as a template literal.

    A simple confirmation or positive feedback if blank lines are seen. Then if so, what version of WebIDE, PC OS, or other helpful detail would be appreciated. Thank you.


    Not seeing blank lines as in that post #13 suggestion:

    Tutorial PPI - Programmable Peripheral Interconnect
        for the MDBT42Q Breakout board
    
    
    
    Single letter command line helper functions
    ...
    


    Template Literal example post #10 and post #13 is not rendering as such with the \n newline stripped and appears like this to me in four separate tests:

     2v03 (c) 2018 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    >
    Tutorial PPI - Programmable Peripheral Interconnect
        for the MDBT42Q Breakout board
    Single letter command line helper functions
    ...
    >dump()
    function t() {
      console.log(`
    Tutorial PPI - Programmable Peripheral Interconnect
        for the MDBT42Q Breakout board
    Line 1
    Line 2
    Single letter command line helper functions
    ...
    `);
    }
    >process.env
    ={
      VERSION: "2v03",
      GIT_COMMIT: "e77d74f6",
      BOARD: "MDBT42Q",
    

    It can be observed from the dump, that the newline char isn't preserved within the function itself, and thus when attempted to then render, doesn't include the blank line as desired.



    Tested with both a nRF52 MDBT42Q and on a STM32 Pico with identical results. Also tested with both the native app and the online IDE

    No minification

    Test using native app Web IDE version 0.70.6
    Test using online Web IDE version 0.73.3

    https://www.espruino.com/ide/
    https://www.espruino.com/ide/emulator.ht­ml



    Overall goal is to reduce the number of code charaters required to output information prompt lines of text. Template Literal has been suggested to remove the repeated 'console.log()' statements.

    https://developer.mozilla.org/en-US/docs­/Web/JavaScript/Reference/Template_liter­als


    1 Attachment

About

Avatar for Robin @Robin started