Comma/Semicolons:
Within a class, a struct, or an instantiation, you can use commas or semicolons to separate members assignments. There can be extra semicolons, they won't hurt, but extra commas will cause syntax error. Before a function definition (or overriding virtual method), there
must be a semicolon if there are any member assignments preceding it. There cannot be a comma left at the end, but there can be a semicolon at the end.
After a class definition, it doesn't matter if you put a semi colon or not.
After a
struct definition, you
must put a semicolon;
To answer your first question about your example of q1 and q2, they are exactly the same.
That date code is a little tricky.
eC lets you write
assignments as part of a class definitions, which kind of replaces the purpose of a constructor. But you cannot put statements there.
So '
date = (now.GetLocalTime(), { now.year, now.month, now.day });' is a trick to embed a statement within an expression, so that we can assign it to our 'date' data member. The first part before the comma fills 'now' with the local time, and the part after the comma is the actual value of that whole expression within brackets, a 'Date' object that gets populated with the value in 'now'.
The 'Date' struct is defined as such:
Code: Select all
public struct Date
{
int year;
Month month;
int day;
};
and is useful for handling dates
Other languages:
liqi has been working (maybe still is
) on a
Chinese localization of the whole SDK. We're trying to get it going using
gettext. This could work for the Calendar Control as well
Of course you could always write your own control the way you like.