[fpc-pascal]Questions about the new features in version 1.2.
Sebastian Günther
sguenther at gmx.de
Mon Apr 9 10:27:03 CEST 2001
Keith Bowes wrote:
>
> 1. What are Interfaces and Widestrings?
An interface is similar to a class which consists only of virtual
abstract methods. Additionally, it isn't derived from TObject or any
other class; COM interfaces have a common ancestor called IUnknown.
Technically, an interface is just a method table.
A WideString is a reference counted string of arbitrary length, just as
AnsiStrings are; but they use 2 bytes per character to encode Unicode
strings. (Currently, using UCS-2 encoding)
> 2. How do you get the upper and lower bounds of dynamic arrays when you
> don't already know those values for certain? When I use the High and Low
> functions for these things, I always get -1 and 0, respectively.
Just use Hi and Lo?
> 3. What are default parameters? Is it where you give parameters default
> values that are used if the parameter isn't passed when the function or
> procedure is called, kind of like optional arguments in JavaScript
> scripting?
Yes
- Sebastian
More information about the fpc-pascal
mailing list