[ooc-compiler] Ported an application
Brought to you by:
mva
|
From: Alexander I. <aj...@ya...> - 2011-08-04 06:25:48
|
Hello!
I was able to port a console application ImportGraph (12 modules) based on Amadeus-3
(XDS Oberon-2) to oo2c. I had to remove some of the functions from the ported modules
and leave only the necessary parts in. That took one day and helped me discover quite
a few differences between the two compilers.
The resulting application is not portable, because it relies on non-portable modules from
the Amadeus library, such as Files and Paths.
The summary of how oo2c differs from the XDS discovered so far:
- different pragmas and system flags;
- no SYSTEM.GET and SYSTEM.PUT procedures;
- no "--" wing comment;
- ORD() can't be used on a BOOLEAN exression or variable, only on characters;
- curly braces and some other characters in published comments ("(**...") must be escaped with "@";
- no Out.Open procedure;
- special string types: arrays, STRING type, CSTRING flag, NO_LENGTH_INFO and
NO_DESCRIPTOR flags. Also, the "STATIC_POINTER" flag, which is documented, but rejected
by the compiler. Not sure yet how all these string (sub-)types get along with each other;
- Win.SetFileTime accepts VAR [NIL_COMPAT] parameters of type Win.FILETIME, but it does not
accept variables of type POINTER TO Win.FILETIME as factual parameters;
- can't use LONG() to promote an integer constant size;
- SYSTEM.VAL can't be used in a constant declaration;
- no typed SETs.
---=====---
Alexander
|