Strange cast error in compile-time function

Stéphan Kochen stephan at kochen.nl
Tue Jul 24 13:00:02 PDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Frits van Bommel wrote:
> DMD doesn't seem to like that call to uintToString(start) from
> genSingleCategoryIf, even though it works fine on its own. The
> workaround is simple though, just change the single-digit case to
> 'return "0123456789"[i..i+1];'.

Awesome, it works! Many thanks! :)

Sad thing is, when running it over the full UnicodeData.txt, the thing
dives deep into swap and even gets killed for excessive memory usage. XD

For now, I suppose I can leave the code intact for whenever the compiler
improves. I can still use this at run-time with the alternate main (that
just prints it using writefln) as an intermediate step to generate the
actual getGeneralCategory (which is then compiled separately).

- -- Stéphan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGplpCcFUq0gzqDwQRAmtkAKDfO9p+0F72Ka26wtL9ZVAKqdMi9gCgobNl
9Qujy9md6XcZgeSW57SZiOQ=
=d74o
-----END PGP SIGNATURE-----



More information about the Digitalmars-d mailing list