Uploaded image for project: 'Railo'
  1. Railo
  2. RAILO-2579

.. and ... range operators (and Range data type)

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      See http://cfmlblog.adamcameron.me/2013/08/thinking-about-operators-in-cfml.html

      This is trickier as it creates a "range" (http://ruby-doc.org/core-2.0/Range.html) which is a concept CFML doesn't have. However the concept is an interesting one.
      The range 1..10 is basically a sequence of values from 1-10. If one was to convert it to an array, one would have [1,2,3,4,5,6,7,8,9,10].

      Ranges can be used for sequences, eg:

      for (i in range)

      { // do stuff }

      //or
      range.each(callback);

      Or in conditional statements, eg:
      if (examScore in 50..100)

      { //pass }

      else

      { //fail }

      and that sort of thing.


      Adam

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                micstriit Michael Offner
                Reporter:
                adamcameroncf Adam Cameron
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: