• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

Odd Ruby Error

Scheduled Pinned Locked Moved Developers' Forum
4 Posts 3 Posters 1.1k Views 3 Watching
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.
  • G Offline
    g2ktcf
    last edited by 13 Dec 2007, 18:28

    I am using the RDE to make my SU Ruby script. I got a strange issue today: elseif was not a recognized keyword in the RDE but is listed in the ruby documentation. I could not get the code to run until I made nested if/then/else/end blocks. Anyone else seen this?

    Chris

    1 Reply Last reply Reply Quote 0
    • T Offline
      todd burch
      last edited by 13 Dec 2007, 18:29

      try elsif

      Todd

      1 Reply Last reply Reply Quote 0
      • M Offline
        mocathe1st
        last edited by 13 Dec 2007, 18:29

        I had this same problem a while ago. This seems to be a weird feature of Ruby where the elsif statement differs from most other programming languages. This is one case where Ruby breaks the "Principle of Least Surprise" that everyone seems to praise it for. 😠

        See this article for a tutorial on Ruby conditionals: http://www.math.umd.edu/~dcarrera/ruby/0.3/chp_02/conditionals.html

        1 Reply Last reply Reply Quote 0
        • G Offline
          g2ktcf
          last edited by 13 Dec 2007, 18:30

          Thanks Todd! I never could have imagined that the spelling was different!!!! 😆 I REALLY feel stupid now.....................

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          1 / 1
          • First post
            1/4
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement