Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.5.6
    • Fix Version/s: 0.6
    • Component/s: Compiler, Parser
    • Labels:
      None
    • Number of attachments :
      1

      Description

      Floats are commonly used in game programming and other areas.
      This patch adds the use of f or F on numeric literals like C#. Boo already uses the term "single" for this primitive type.

      a = 0F
      b = 1f
      c = 1.0f
      d as single = 2.0
      print(a.GetType()) //System.Single
      print(b.GetType())
      print(c.GetType())
      print(d.GetType())

      It uses float.Parse instead of double.Parse to catch values too big for a float:

      //works
      zdouble = 1000000000000000000000000000000000000000000000000000.0
      //error at compile time, too big for float:
      zsingle = 1000000000000000000000000000000000000000000000000000.0f

        Issue Links

          Activity

          Hide
          Doug H added a comment -

          Made minor fix to jedit syntax files

          Show
          Doug H added a comment - Made minor fix to jedit syntax files
          Hide
          Rodrigo B. de Oliveira added a comment -

          Thanks!

          Show
          Rodrigo B. de Oliveira added a comment - Thanks!
          Hide
          Doug H added a comment -

          Part of patch wasn't applied.

          Show
          Doug H added a comment - Part of patch wasn't applied.

            People

            • Assignee:
              Doug H
              Reporter:
              Doug H
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: