Dear all,
I need to run the scripts in a real time environment where there is a limited implementation of the standard C++ library, and particularly a very poor stream class.
This causes a lot of errors when trying to include the add-on implementation of the string factory and class.
I have two choices to get out of this problem:
1) Implement a different string factory not using streams
2) Implement a different string native object
As for point 1) I know what to do, and for sure this is the quickest and easiest solution, but let me investigate further the second option, that for me is more interesting because it may solve a different category of problems too (see later).
The basic question is: how much is complex to add to the language a simple static "C" type array?
In order to have something like:
int foo[20];
char buf[100];
SomeDefinedType[3];
... and possibly ...
double Matrix[3][3];
This addition whould automatically solve my string problem too, by using char arrays, and all standard "C" routine strcat, strcpy, strstr, ... by adding them as external calls or even implementing in a script module.
Having the "C" array, can solve my other problem too.
Sometimes I have some data structures, that I want to map and exchange between the script enviromìnment and the host interpreter. These structure come from far ago and I cannot easily change them without breaking a lot of code.
some of those structures are defined like:
struct msg {
int Id;
int len;
char data[24];
};
As it is, I cannot exchange this data type, other than copying over one type to the other. I cannot even include a common definition file to have it defined into the two environment, because the above structure whould not compile in as.
Enough for the description, now the real question:
I am willing to help adding this feature, but I need some help to start.
Where I need to start looking first to add this thing to the compiler?
Any suggestion? Disclamers?
Thanks a lot.
Mau.