1. Is it possible to override operators such as '+', '-', '/', '*' using dedicated functions? As mentioned elsewhere we (me and @Dzandaa) are working on a software implementation of floating point numbers (as type TFloat32=UInt32). In this case using functions as equivalent for operators (for example Float32Mul for multiplication) is not very comfortable, simple operators could be much easier...
Operator overloading is independent of the used platform. However you can
only overload operators that are not already defined internally by the compiler. These operators are also defined when you declare a unique type alias (using
type TypeName), because after all a unique type alias of e.g.
LongInt is
still a
LongInt.
2. What is your opinion about PChars (=arrays[0..n] of char) in code for AVRs? Is this feature fully supported by the compiler? In the wiki page https://wiki.freepascal.org/AVR_Programming there is no mention about PChars, but I think it was written at one point that PChars work. If yes - what is better to use in practice: strings[n] or arrays[0..n] of char?
Please note that
PChar is not a
array[0..n] of Char, but
^Char. So while you can pass a pointer to the first element of an
array[0..n] of Char to a
PChar it can also point to some memory. The important point is that it needs to end with a
#0 as that is used to determine the length.