Thursday, October 30, 2008 5:39 PM
by
admin
M Enumerator : Day 1
So you have your OSLO SDK installed and your Intellipad running smoothing on your screen. Well, let’s get busy.
Let’s remember a simple factoid: module is the basic organization structure in M language. The following code is the smallest unit of M language
module Commerce
{
}
In your Intellipad, press ctrl \ and type SetMode(“MMode”) to start your model mode.
Off course right now it does nothing. In M, you define a type by using the type keyword and in this example, we are going to create an enumerator type.
module Commerce
{
type CustomerLevel {“Exclusive”, “Bargain Hunter”, “Frugal”};
}
That’s it for now;you have created your first M enumerator.