sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Difference between 4 % 2 and 4 %2

    Scheduled Pinned Locked Moved Developers' Forum
    2 Posts 2 Posters 163 Views 2 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.
    • C Offline
      cjthompson
      last edited by

      Does anyone know why 4 %(space)2 works, but 4 %(no space)2 raises a syntax error (if it's in a file)?

      Also, why does 2 -1 work, and 2.to_f - 1 works, but 2.to_f -1 doesn't?

      1 Reply Last reply Reply Quote 0
      • R Offline
        remus
        last edited by

        Id guess its to do with how ruby expects to receive arguments for the method. If you put brackets around it it should work, i.e.
        4%(2) and 2.to_f-(1)

        http://remusrendering.wordpress.com/

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

        Advertisement