Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Can I use 'continue' in a ternary construct?

    Scheduled Pinned Locked Moved
    Gcode meta commands
    4
    4
    195
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • oliofundefined
      oliof
      last edited by

      Is the following valid?

      {exists(global.debug) && global.debug} ? echo 'foo' : continue
      

      If no, what would I use instead of continue?

      <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

      dc42undefined moth4017undefined 2 Replies Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators @oliof
        last edited by

        @oliof no, because continue is a command, not an expression. Use an if-statement instead.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        1 Reply Last reply Reply Quote 1
        • moth4017undefined
          moth4017 @oliof
          last edited by

          @oliof thanks for asking , @dc42 is there a print to console function ?

          <

          DocTruckerundefined 1 Reply Last reply Reply Quote 0
          • DocTruckerundefined
            DocTrucker @moth4017
            last edited by

            @moth4017 try the echo keyword in comditional gcode. Failing that M117 display message.

            Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

            1 Reply Last reply Reply Quote 1
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA