What's the piece of Delphi knowledge you find yourself looking up over and over again?
What's the piece of Delphi knowledge you find yourself looking up over and over again?
For me format strings is probably the thing that most stubbornly refuses to stay put in my brain.
http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.SysUtils.Format
For me format strings is probably the thing that most stubbornly refuses to stay put in my brain.
http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.SysUtils.Format
Oops didn't mean to disable comments. Please comment away!
ReplyDeleteMaybe regular expression? But it's not Delphi only.
ReplyDeleteMy favorite example is from the REST unit....
ReplyDelete"TRESTRequestParameterKind.pkGETorPOST"
Who the bloody heck is going to remember that? Who named it? Must have been a native German speaker. ;-)
Joseph Mitzen This is good name imho. But see on this: github.com - org.aspectj
ReplyDeleteI use the GExperts Code Librarian to remember how to style DevExpress cxGrid colours for different cells or rows. Must have looked it up dozens if not hundreds of times.
ReplyDeleteJacek Laskowski That's a very funny class name! If we're talking about Java, here's one of the longest and poorest I know of:
ReplyDeletegithub.com - jdk16045
File extension handling. Is the dot required/present or not.
ReplyDeleteMost things about generics.
Jeroen Wiert Pluimers Same here! :)
ReplyDeletetype
ReplyDeleteMyRec = record
a: integer;
b: string;
end;
const
MyRecArray : array[0..10] of MyRec = ( ??????? )
Since I do not declare const arrays of records every day , every time I have to declare them I have to look up the syntax.
Out of your head, in the above example, do you know how to declare the const array ?
Syntax for variant records sometimes.
ReplyDeletehttp://docwiki.embarcadero.com/RADStudio/Tokyo/en/Structured_Types_(Delphi)#Variant_Parts_in_Records
Which features were added in which delphi versions, and the corresponding value of {$if compilerversion ...}
ReplyDeleteMarkus Joos One of those many places where a consistent syntax would have helped because this has at least 3 big WATs:
ReplyDelete1. const arrays have values between parentheses instead of square brackets like usually the case for array syntax
2. const record values have identifier and value separated with a colon instead of equal sign like for all other const declarations
3. const record values are separated with a semicolon rather than a comma as usual
But wait there is more - now that we have "const" dynamic array declaration like this:
const
nums: array of Integer = [1, 2, 3];
we also have that for records, right? No! Since that does not compile (see https://quality.embarcadero.com/browse/RSP-19816):
const
MyRecs: array of MyRec = [(a:1;b:'foo')];
Now tell me how awesome Delphi is... consistency wise the syntax is a frankensteins monster.
Stefan Glienke Even worse - the typed const isn't even a const.
ReplyDeleteThe way to set as much digits as I want (no more, no less) while formating reals using FloatToStr, FormatFloat, FlaotToStrF...
ReplyDelete