Talk:Structured Types (Delphi)

From RAD Studio
Jump to: navigation, search

In the Dynamic Array topic is the following sentence:

"To truncate a dynamic array, pass it to SetLength, or pass it to Copy and assign the result back to the array variable. (The SetLength procedure is usually faster.) For example, if A is a dynamic array, A := SetLength(A, 0, 20) truncates all but the first 20 elements of A."

I believe the example statement

  A := SetLength(A, 0, 20)

should read

  A := Copy(A, 0, 20)

Response March 2, 2010

Thank you for your correction. I have verified and inserted the changes. KrisHouser 15:22, 2 March 2010 (PST)

procedure groups

In Delphi 5/7 help the routines were split to topic-related groups. For example there were array-handling routines, String (PChar) handling routines and so on.

This example lacks list of array-related routines, or better list to page, linking them (Such a list could then be referenced from different pages, including functions themselves. It can also be done as wiki Category). Examples names two - SetLength and Copy. But do not give link to thei description. More so, out of my head i'd easily name few more: Length, Slice, Low and High, VarArrayLowBound and VarArrayHighBound, maybe more.

A user comes here to read "what array is and what i can do to it" - this article lacks very much on 2nd part of question. I'd say it's typical for XE2 manuals. Lack of topics cross-reference. Delphi5/7 were much better in that, pity it was lost when exporting to wiki.

Response

This issue has been added to our work queue.

BTW - the cross linking that existed in the Delphi 7 help was "left behind" when the docs were migrated from FrameMaker and Word to XML back in 2005. When we migrated to wiki in 2009, more links were added, not fewer links. But we still have not entirely restored Delphi 7 links. Pointing out this particular area means that the links here will be restored. This is a very good thing. Thank you for your input.

KrisHouser 10:30, 25 October 2011 (PDT)

RAD-10173

Set of char produces compiler warning

The example "var MySet: set of 'a'..'z';" now produces a compiler warning. So, some discussion of how sets interact with unicode would be helpful. Davidmarcus 13:10, 21 December 2011 (PST)

And they do not, they work with AnsiChar. Which leads to unexpected bugs since D2009 - http://qc.embarcadero.com/wc/qcmain.aspx?d=100685 Arioch 15:27, 22 December 2011 (PST)

typing error

in block

 type TMessageGrid = array of array of string;
 var Msgs: TMessageGrid;
</soure>

need

</source>

Thrall15032 03:00, 13 January 2012 (PST)

Response

I've made the correction in the English wiki. The localized wikis do not contain this error.

Many thanks for your input --

KrisHouser 10:05, 13 January 2012 (PST)

Note that Variant Parts in Records can be nested

See for example System.TVarData record. It MUST be noted in the syntax description of the Record type! --Nashev (talk) 00:54, 13 October 2017 (PDT)