I sort of modified yours to get it to work: here is what I did

1
2
3
4
5
6
7
[<Measure>] type hour
[<Measure>] type min
[<Measure>] type sec

type seconds =
   static member perMinute = 60.0
   static member perHour = 3600.0

One problem I think was that you were trying to define both a measure and a type with the same name (sec)
Also, replace instead of with, use =

As for the less than sign, it is right next to the greater than symbol on your keyboard

N M < > so basically hitting SHIFT + , button should give you <
, .

Hope this helps.
~sparky

By on 9/3/2008 12:37 PM ()

Hi, thanks for your answer.

I was trying to define a measure type and then extend it with some static members.

Curiously, the following compiles correctly:

1
2
3
4
5
6
7
[ Measure>]
type sec =
    static member A = "A"

type sec with
    static member B = "B"
    static member C = "C"

Any ideas?

And, by the way, how can I avoid the forum parsing the less-than sign as an HTML tag?

By on 9/3/2008 4:52 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper