Hi,
I have a question: What is the difference between MikroC and MikroPascal compiler?
Are they the same, like Pascal and Basic so you do only a syntax conversion?
Do you achieve a better code (faster) with C? A better memory footprint with C?
Why do you develop all the libraries in C?
Best regards, Florin Medrea.
MikroC vs. MikroPascal
Re: MikroC vs. MikroPascal
In essence, they are the same compiler. What is different is the parsing engine, which reads language code. Optimizer, linker, code generator, simulator, ICD etc. are indetical. The differences in resulting HEX arise because parsing C is generating a different optimizer tree than parsing Pascal or Basic. We are working on this, so in near future we shall equalize them even in this detail.yo2lio wrote: I have a question: What is the difference between MikroC and MikroPascal compiler?
Yes, they are, as I said.Are they the same, like Pascal and Basic so you do only a syntax conversion?
You can test it and see it that the differences are minor.Do you achieve a better code (faster) with C? A better memory footprint with C?
We do not. All libraries exist in Pascal and in C. We keep them in both languages for the sake of testing. Which is firstly written depends on humidity in the air.Why do you develop all the libraries in C?
Be aware of the fact that C is the industry standard. It is very easy to find implementation for what you need in C language. Often, when we search for resources for our libs, we find lots of code in C. Then we modify such codes for our compiler and finally, translate the resulting lib into Pascal.
Initially, all libraries originated from mikroPascal, today we have no rule. One who writes the new lib is obliged to give the source in both languages.
The only exception was Realtek Ethernet library, which originated in C, but it was impossible to translate it into Pascal since it used ellipses and anonyomous unions which do not exist in Pascal. However, MCL was compatible and the library appeared in mP and mB as well.
mikroBasic is the youngest child in the family and we unfortunately have no time to tranlsate libs into Basic. Fortunately, MCLs are compatible, so we easily add new libs. All the same, testing of mC and mP guarantees that mB will behave the same (it is the same compiler engine, after all).