[fpc-pascal] Question about interfaces

Micha Nelissen micha at neli.hopto.org
Sat Mar 19 08:19:44 CET 2005


On Sat, 19 Mar 2005 00:44:24 +0100
ml <ml at brainwashers.org> wrote:

> > These are C++ operators, aren't they?
> 
> Yes (some of them are, but not all), but if you think about it basic
> definition of operators is to make source code more easily readable.
> 
> Couldn't you imagine to use 
> a := b % c;
> and a would actually contain real percentage??

I would read it as 'mod', because that's what means in C.
 
> or
> s := 'Value is : ' $ CurrentValue;
> 
> and this would translate CurrentValue to currency and add to a string?
> 
> btw. and yes,:) my line of work forces me to use pascal, c#, c++, c,
> sql, shell and a little bit of php. So I'm forced to see the beauty and
> the ugly parts and features of each one. And operators are a real life
> saver, at least for future reading of your code (that is if they are
> carefully designed). 

I disagree, it's not at all intuitive what the above '$' operator should mean. Is ' + CurrencyToStr(CurrentValue)' or whatever really so much to type?

Micha




More information about the fpc-pascal mailing list