Archive for the ‘Delphi’ Category
Posted by jpluimers on 2012/12/06
Thanks Nick Craver for answering this on StackOverflow.
Array initializers can be specified in field declarations (§17.4), local variable declarations (§15.5.1), and
array creation expressions (§14.5.10.2).
The array initializer can end in a comma, which makes some things way easier (boy, I wish I had this in other programming languages).
From Nick’s answer:
It has no special meaning, just the way the compiler works, it’s mainly for this reason:
[FlagsAttribute]
public enum DependencyPropertyOptions : byte
{
Default = 1,
ReadOnly = 2,
Optional = 4,
DelegateProperty = 32,
Metadata = 8,
NonSerialized = 16,
//EnumPropertyIWantToCommentOutEasily = 32
}
[/language]By comment request: This info comes straight out of the ECMA C# Specification (Page 363/Section 19.7)
“Like Standard C++, C# allows a trailing comma at the end of an array-initializer. This syntax provides flexibility in adding or deleting members from such a list, and simplifies machine generation of such lists.”
–jeroen
via c# – .NET Enumeration allows comma in the last field – Stack Overflow.
Posted in .NET, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C++, Delphi, Development, Java, JavaScript/ECMAScript, PHP, Software Development, VB.NET | 5 Comments »
Posted by jpluimers on 2012/11/20
A while ago I had a “duh” moment while calling a method that had many overloads, and one of the overloads was using int, not the char I’d expect.
The result was that a default value for that char was used, and my parameter was interpreted as a (very small) buffer size. I only found out something went wrong when writing unit tests around my code.
The culprit is this C# char feature (other implicit type conversions nicely summarized by Muhammad Javed):
A char can be implicitly converted to ushort, int, uint, long, ulong, float, double, or decimal. However, there are no implicit conversions from other types to the char type.
Switching between various development environments, I totally forgot this is the case in languages based on C and Java ancestry. But not in VB and Delphi ancestry (C/C++ do numeric promotions of char to int and Java widens 2-byte char to 4-byte int; Delphi and VB.net don’t).
I’m not the only one who was confused, so Eric Lippert wrote a nice blog post on it in 2009: Why does char convert implicitly to ushort but not vice versa? – Fabulous Adventures In Coding – Site Home – MSDN Blogs.
Basically, it is the C ancestry: a char is an integral type always known to contain an integer value representing a Unicode character. The opposite is not true: an integer type is not always representing a Unicode character.
Lesson learned: if you have a large number of overloads (either writing them or using them) watch for mixing char and int parameters.
Note that overload resolution can be diffucult enough (C# 3 had breaking changes and C# 4 had breaking changes too, and those are only for C#), so don’t make it more difficult than it should be (:
Below a few examples in C# and VB and their IL disassemblies to illustrate their differnces based on asterisk (*) and space ( ) that also show that not all implicits are created equal: Decimal is done at run-time, the rest at compile time.
Note that the order of the methods is alphabetic, but the calls are in order of the type and size of the numeric types (integral types, then floating point types, then decimal).
A few interesting observations:
- The C# compiler implicitly converts char with all calls except for decimal, where an implicit conversion at run time is used:
L_004c: call valuetype [mscorlib]System.Decimal [mscorlib]System.Decimal::op_Implicit(char)
L_0051: call void CharIntCompatibilityCSharp.Program::writeLineDecimal(valuetype [mscorlib]System.Decimal)
- Same for implicit conversion of byte to the other types, though here the C# and VB.NET compilers generate slightly different code for run-time conversion.
C# uses an implicit conversion:
L_00af: ldloc.1
L_00b0: call valuetype [mscorlib]System.Decimal [mscorlib]System.Decimal::op_Implicit(uint8)
L_00b5: call void CharIntCompatibilityCSharp.Program::writeLineDecimal(valuetype [mscorlib]System.Decimal)
VB.NET calls a constructor:
L_006e: ldloc.1
L_006f: newobj instance void [mscorlib]System.Decimal::.ctor(int32)
L_0075: call void CharIntCompatibilityVB.Program::writeLineDecimal(valuetype [mscorlib]System.Decimal)
Here is the example code: Read the rest of this entry »
Posted in .NET, Agile, Algorithms, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C++, Delphi, Development, Encoding, Floating point handling, Java, Software Development, Unicode, Unit Testing, VB.NET | 1 Comment »
Posted by jpluimers on 2012/10/08
Nice!:
New utility: PDX Viewer Plus 1.00 beta. A simple Paradox Database Viewer that does not require drivers or an install.
–jeroen
via: Twitter / alexnolannet: New utility: PDX Viewer Plus ….
Posted in Database Development, Delphi, Development, Paradox, Power User, Software Development | Leave a Comment »
Posted by jpluimers on 2012/10/03
Jim Tierney isn’t on DelphiFeeds yet, so below are a few links to his great Delphi XE3 LiveBindings posts.
Jim is one of the people that developed LiveBindings. In addition to that, he explains things very well.
He did some great posts on LiveBindings after Delphi XE2 got launched (he also did two great presentations on Delphi Live 2011 and CodeRage 6 – they got repeated on the last 24 hours of Delphi).
Now he is publishing a series of posts on LiveBindings in Delphi XE3.
These posts are recommended reading, more are probably on their way:
–jeroen
via: Jim Tierney
Posted in Delphi, Delphi XE3, Development, Software Development | Tagged: 24 hours, Delphi, design time, education, presentations, quotes, recommended reading, tierney | Leave a Comment »
Posted by jpluimers on 2012/09/28
There are three RAD Studio / Delphi XE3 hotfixes on the Delphi Registered User Downloads page.
Hotfix 3 is for the Professional edition only.
The others are for all editions.
This Hotfix addresses an issue in using SQLite driver on the Professional edition.
Available only to registered users of Professional edition of Delphi XE3, C++Builder XE3, RAD Studio XE3, and Embarcadero All-Access XE
1MB; Download
This Hotfix addresses a regression with using the GestureManager in a FireMonkey application.
Available only to registered users of Delphi XE3, C++Builder XE3, RAD Studio XE3, and Embarcadero All-Access XE
60MB; Download
This Hotfix addresses an issue with ShowMessage in a FireMonkey application on certain locales on Mac OS X.
Available only to registered users of Delphi XE3, C++Builder XE3, RAD Studio XE3, and Embarcadero All-Access XE
12.1MB; Download
–jeroen
via: Delphi Registered User Downloads.
Posted in Delphi, Delphi XE3, Development, Software Development | Tagged: c builder, computer, Delphi, download delphi, embarcadero, hotfixes, mac os x, professional edition, regression, software, technology | 5 Comments »
Posted by jpluimers on 2012/09/27
Cool: learned something new here:
About the path names of files being in the .dproj as well as in the .dpr:
@Jeroen – Looks like msbuild might need those entries, otherwise they’re possibly redundant, AFAICT… In any case, there is not much editing involved, just delete ‘dccreference’ entries and then a ‘save all’ in the IDE regenerates them. – Sertac Akyuz
–jeroen
via: refactoring – How to reorganize the folder structure of my units in Delphi? – Stack Overflow.
Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development | Tagged: computer, Delphi, folder structure, ide, path names, stack overflow, technology | 14 Comments »
Posted by jpluimers on 2012/09/26
Database Workbench is my tool of choice for doing database work: it supports many backends in a consistent manner, and behaves a lot like Delphi (like running and debugging stored procedures).
Yesterday the free Lite Editions of Version 4.3.1 got released:
Database Workbench 4.3.1 free Lite Editions released
This new release of Database Workbench brings new features and enhancements, as requested by our users.
The free Lite Editions are now available.
More information about Database Workbench is available at the Database Workbench page, download your copy today via our downloads page, pricing information is available, the limited Lite Editions are available for free.
Changes in this release
- The full details and list of changes are available here and here.
- New
- MySQL Stored Procedure, Function and Trigger Debugging (Pro Edition only)
- InterBase and Firebird syntax check in Trigger Editor (Pro Edition only)
- Incremental search of data in SQL, Table and View Editor
Changes
- More compact taskbar
- MySQL support for BINARY and VARBINARY datatypes
- MySQL error fixed when not having access to mysql.procs
- MySQL fix for fetching foreign key information
- Data Import and Export fixes
- Windows 7 event log error by SideBySide fixed
And much more…
–jeroen
via News @ Upscene Productions.

Posted in Database Development, Delphi, Development, Firebird, InterBase, MySQL, OracleDB, PostgreSQL, Software Development, SQL, SQL Server, SQL Server 2000, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, SQL Server 7 | 1 Comment »
Posted by jpluimers on 2012/09/24
Remanence of the PC computing past: Intel MCS-86 Assembly Language Reference Guide on bitsavers.org in http://bitsavers.org/pdf/intel/8086.
Intel MCS-86 is/was the 16-bit range of x86 processors.
I used it in BASM (not only in Delphi 1 and up, it started in Turbo Pascal 6), and before that in MASM, NASM, and TASM.
–jeroen
Posted in Assembly Language, BitSavers.org, Delphi, Delphi 1, Development, History, Software Development, x86 | Tagged: assembly language, computer, Delphi, delphi 1, intel, intel 8086, intel assembly, intel mcs, language reference guide, nasm, pc computing, pdf, technology, turbo pascal 6, x86 processors | 5 Comments »
Posted by jpluimers on 2012/09/23
Frank Borland is back. You can meet him at Micro Focus now – they acquired Borland a while ago – where he relates to things from the past:
Frank Borland first appeared in advertisements and on the cover of the SideKick manual in 1984. Later on, Frank appeared in the first version of the Turbo Tutor manual.
He is talking about powerful and affordable, has Facebook as well as presence on LinkedIn, Twitter and Google+.
But I when I look at the MicroFocus product portfolio, I don’t see any that are both affordable and powerful.
Todays software days are different than 30 years ago, but I do agree with a couple of the points he made:
- Keep it open
- Don’t make it big, make it better
- Focus on the user experience
- Listen to the community
I don’t think you necessarily need to meet these two though:
- Meet every platform need
- Make it affordable
As those two tend to contradict each other.
What do you think?
–jeroen
via: » Frank’s Story Meet Frank Borland.
Posted in Agile, Delphi, Development, Opinions, Software Development, Testing, Unit Testing | Tagged: borland, business, computer, google, marketing, micro focus, product portfolio, technology, todays software, tutor, twitter | 21 Comments »
Posted by jpluimers on 2012/09/19
While scheduling this year’s projects, it was clear that it would become impossible to have the summer holiday in the summer (last year was also outside, as we fulfilled Nicolette’s dream: visit the Antarctic region).
So we moved this year’s holiday to early November, hoping that would be outside the Fall conference season.
Alas, EKON (Entwickler-Konferenz.de), this year in Düsseldorf, Germany, moved themselves to November, so this will be the first EKON ever that I won’t attend (out of 3 or 4 people that never missed one). Sorry guys I will miss the great speakers, sessions and workshops (:
I am going to speak on two other European Delphi conferences though:
I’m really looking forward meeting the attendees, speakers and organizations there. Conferences are always a lot of fun and a great way for me of learning new things.
--jeroen
via:
Posted in About, Antarctic, Conferences, Delphi, Delphi XE2, Delphi XE3, Delphi-Tage.de, Development, EKON, Event, ITDevCon, Personal, Software Development, Travel | Tagged: antarctic region, attendees, düsseldorf germany, Delphi, delphi conferences, delphi language, delphi tips, early november, eco system, education, ekon, heidelberg germany, hidden gems, nicolette, operator overloading, public appearances, right tools, summer holiday, tips and tricks, Travel, verona italy | 2 Comments »