### Delphi Corner Weblog

The blog to Rudy's Delphi Corner.

## It is working again

Posted on in Blogs
It appears that I am able to write posts again. YAY! Expect to see more here. And it looks as if the comments were restored as well. Thank you, Embarcadero!...
Tags: This Weblog

## New: BigDecimals

Posted on in Blogs
After BigIntegers, the next logical step was the implementation of BigDecimals. I implemented them using BigIntegers, because a BigDecimal is not much more than a BigInteger divided (or multiplied) by - scaled by - a power of 10. Unlike BigIntegers, my implementation of BigDecimals does not use any assembler, so it should be usable anywhere BigIntegers can be used. The BigDecimals are mostly modelled after the interface of the BigDecimal class in Java, but, like BigIntegers, made more Delp...

## In Delphi, is addition commutative?

Posted on in Blogs
Answer: no, not necessarily. Despite the existence of operator precedence, i.e. the fact that the following X := 3 + 4 * 5; results in 23 and not in 35, the order of operands can still have an effect. In my BigInteger code, I discovered an odd error, that only happened in some very rare cases, and only in PUREPASCAL code, i.e. code that did not use assembler, and only in 64 bit. It took me several hours to find out that this was the problematic expression: Value := NormDividend[I + J]...

## New: BigIntegers

Posted on in Blogs
I wrote a new implementation of BigIntegers (almost unlimited size integers) for Delphi. It uses assembler for the low level stuff, although there is a PUREPASCAL version for each of these routines too. Instead of using the GPL-licensed GNU Multi-Precision (GMP) library, I wrote everything from scratch, without using any code from others. I think it is pretty fast, especially because I optimized many of the routines, either by techniques like loop unrolling or using 64 bits at once, or by usi...

## Rudy's Delphi Corner is back online

Posted on in Blogs
Because of problems with my old domain and my provider, my old Delphi Corner website http://www.rvelthuis.de was offline for a while, and parked as subdirectory of another domain of mine. I am very pleased to announce that it is back online, at the old address: http://rvelthuis.de YAY!...

## Speed problems caused by code that never ran

Posted on in Blogs
Let me start out by telling you that I am currently implementing a (simple) BigInteger implementation for Delphi. This implementation tries to be compatible with the BigIntegers as used in .NET, so I can test my results to be the same as the results of my tests in C#. For this, RightShift must use two's complement semantics, and shifting a negative integer must shift in 1-bits from the top, so -100 (\$FFFFFF9C) shifts to -50 (hex \$FFFFFFCE). For normal Integer values, the result in Delphi woul...

## Delphi Corner new URL

Posted on in Blogs
Because of problems with my old domain and my provider, my old Delphi Corner website http://www.rvelthuis.de is now in the hands of a domain grabber who asks a horrendous amount of money for the page. Until I get this cleared up (if at all), I parked my pages at http://www.praxis-velthuis.de/rdc/ . You can find the articles and components and other pieces of software there....

## Delphi for .NET namespaces misunderstood?

Posted on in Blogs
Confusion There seems to be a big confusion about Delphi for .NET namespaces. I guess this is because there was a big change between Delphi 8 and Delphi 2005. In Delphi 8, each unit was its own namespace. In Delphi 2005, several units can be placed in the same namespace, by prefixing the unit name with the namespace name. You can even add to an existing namespace in an assembly not written in Delphi for .NET. I often see the argument that namespaces in Delphi for .NET are non-standard. But since...
Tags: Delphi

## My quotes.txt file

Posted on in Blogs
I have often been asked about the quotes I use when writing to the newsgroups. These come from a file called quotes.txt, and are placed under my messages by my news client, XanaNews, by some kind of random process. Although, sometimes the quotes are so appropriate, that I still suspect that Colin Wilson (the author of XanaNews) has secretly put a small, hidden artificial intelligence machine into the sources. Anyway, many people have asked me for the quotes file. That is why I decided to publish...
Tags: TeamB

## New article on pointers on my website

Posted on in Blogs
I wrote a new article on pointers and placed it on my website. Any comments are welcome....
Tags: Delphi