Hi Sam,
The truth is that Windows console simply doesn't support UTF-8, as I found out recently trying to set it up myself...
There was a hack which apparently worked at one point, setting the codepage to a particular ID which represents UTF-8.
See the following:
http://www.google.ca/search?hl=en&safe=off&q=SetConsoleOutputCP+utf-8&btnG=Search&meta=http://blogs.msdn.com/michkap/archive/2007/05/11/2547703.aspxhttp://www.tek-tips.com/viewthread.cfm?qid=1428936&page=2http://msdn.microsoft.com/en-us/library/ms686036(VS.85).aspxSetConsoleOutputCP( 65001 ) // that is supposed to set the console to UTF-8
However that command fails for me.
Please let me know if you do manage to make it work :)
Why is Linux better? This particular thing is just one example...
The fact that Linux is open and free is a big plus also.
Operator Overloading:
I'm hoping to support it in a future version of eC. However at the moment much can be done with the "conversion properties" of eC for scalar types, which would normally require operator overloading if they were C++ classes. Related units can be added, subtracted together.
For support in Vectors per example, I will have to add extra support to specify how vectors are to be operated upon...
Here's some sample code:
void Main()
{
ColorRGB a = Color { 255, 0, 0 };
Color c = ColorRGB { 0.35f, 1.0f, 1.0f };
ColorRGB a = Red;
ColorHSV a = ColorHSV { Degrees{90}, 100, 100 };
ColorHSV a = ColorHSV { 90, 100, 100 };
ColorRGB a = ColorHSV { 90, 100, 100 };
ColorRGB a = ColorHSV { Degrees { 90 }, 100, 100 };
Color a = ColorHSV { 100, 40, 30 };
Color a = ColorHSV { 0, 50, 100 };
Color a = ColorRGB { 1, 0.3f, 0.3f };
Color c = ColorRGB { 0.35f, 1.0f, 1.0f };
ColorRGB a = Red;
ColorRGB a = ColorHSV { 1, 0.3f, 0.3f };
ColorCMYK a = ColorHSV { 90, 60, 40 };
ColorLab a = Red;
ColorHSV a = ColorHSV { Pi/8, 100, 100 };
ColorHSV a = ColorRGB { 1, 0.3f, 0.3f };
ColorHSV a = Color { 40, 130, 30 };
ColorHSV a = ColorRGB { 40/255.0f, 130/255.0f, 30/255.0f };
ColorHSV a = Red;
ColorHSV a = Indigo;
ColorHSV a = ColorLab { 30, 60, -40 };
ColorHSV a = ColorRGB { 1, 0.3f, 0.3f };
ColorHSV a = Color { 40, 130, 30 };
ColorHSV a = ColorLab { 40, 60, 30 };
ColorHSV a = Red;
Color a = ColorHSV { a, 40, 30 };
double a = 4 + Pi;
double a = Pi + 4;
double a = 4 + Pi + 0;
double a = Pi + 4 + 0;
double a = 0 + 4 + Pi;
double a = 0 + Pi + 4;
double a = Radians{0} + Pi;
double a = Degrees{0} + Degrees{30};
Degrees a = Radians{Pi/4} + 45;
Degrees a = Radians{Pi/4} + 20 + Degrees{30};
Degrees a = Radians{Pi/4} + Pi/8 + Degrees{30} + Pi/4;
Degrees a = Radians{0} + Pi;
Degrees a {Radians{Pi/2}};
double a = Radians{Pi/4} + Degrees{30}; // Make this a warning...
double a = Degrees{30} + Radians{Pi/4}; // Make this a warning...
double a = (Degrees)Radians{Pi};
Degrees a = Radians{Pi/2};
Degrees a = Radians{Pi/4};
double a = (Radians)Degrees{45};
double a = Degrees{30} / 4;
double a = Degrees{30} + Pi/4; // This should generate a warning...
double a = Degrees{30} + Pi/8 ; // This should generate a warning...
double a = Radians{Pi/4} + Pi/8 + Degrees{30} + Pi/4; // This should generate a warning...
Radians a = Degrees{30};
Radians a = (Radians)Degrees{45} * 4;
Radians a = Degrees{45} * 4;
Radians a = Degrees{20} + 25;
Degrees a = Degrees{Radians{10}};
Degrees a = Degrees{60};
Radians a = Degrees{Radians { Pi/2 }};
Radians a = Degrees{Pi/2};
double a = (Degrees) (Pi/4);
Degrees a;
Radians b = a;
double a = (Degrees)Radians{Pi};
Degrees a = Pi/4;
double a;
double e = Degrees{60};
double e = Degrees{a};
double dbl;
Degrees deg;
Degrees a = Degrees { dbl };
Degrees a = Degrees { deg };
Degrees a = Degrees { Degrees { dbl } };
Degrees a = Degrees { a };
Degrees a = Degrees { Degrees { 30 } };
Degrees a = Degrees { 60 };
Degrees c = Radians{1.40};
Degrees d = Radians{1.40} + 10;
double a;
Degrees a;
double f = a;
Degrees b = Pi/4;
Angle a = Degrees{30};
Radians a = Degrees{30};
Degrees yo = Degrees{30} + Radians{30};
Degrees a = Degrees { Radians { 1.40 } }; // 1.40
Degrees a = Degrees { 30 }; // 30 degrees in radians
Feet b = Meters{5};
Meters a = Feet{5 + 8/12.0};
double a = (Meters)Feet{5 + 8/12.0};
double a = Feet{5};
WorldPoint a = PolarPoint { 30, 10 };
PolarPoint a = WorldPoint { 50, 40 };
GeoPoint a { 50, 30 };
double a = Degrees{20} + 25;
double a = 25 + Degrees{20};
(Radians)Degrees{45} * 4;
(double)(Degrees{20} + 25);
(double)(Degrees{20} + 25);
(double)(25 + Degrees{20});
(double)(25 + Degrees{20});
(double)(Feet)Meters{5};
(double)(Degrees)Radians{5};
}
Multi-cast delegate: you're quite far now... Is this a C# specific thing?
eC is meant to be an extension to C, and as such this can probably be done with regular C function pointers.
Super type safety is not a primary design goal of eC...
Regards,
Jerome
You received this message because you are subscribed to the Google Groups "eC Programming Language" group.
To post to this group, send email to ec-programming-language-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to ec-programming-language+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at http://groups.google.ca/group/ec-programming-language?hl=en