Help:Contents

From Code Examples
Jump to: navigation, search

Here are instructions to enter a code example into the code example wiki:

1. Enter the following URL in your browser with the name of your example in place of "TrySystemTimeToDateTime" and (C++) in place of (Delphi) for C++ examples. Don't forget the space:

http://docwiki.embarcadero.com/CodeSamples/XE/en/TrySystemTimeToDateTime_(Delphi)

2. Select "edit this page". You must be logged into the wiki and have permission to edit.

3. Reference the TrySystemTimneToDateTime example above in edit mode as a guide. The basic format is:

=Description=
This is your description
=Code=
<source lang=delphi>
This is where your code goes.
 
</source>
=Uses=
* [[VCL_En:SysUtils.TrySystemTimeToDateTime|SysUtils.TrySystemTimeToDateTime]] ''(  [[VCL_Fr:SysUtils.TrySystemTimeToDateTime|FR]] | [[VCL_De:SysUtils.TrySystemTimeToDateTime|DE]] | [[VCL_JP:SysUtils.TrySystemTimeToDateTime|JP]]  )''
 
[[Category: Delphi]]

4. Edit this page to place your example in the Code Sample Index:

http://docwiki.embarcadero.com/CodeSamples/XE/en/Code_Sample_Index]

5. Go to that page and you can see that the entry for my TrySystemTimeToDateTime example is:

'''[[TrySystemTimeToDateTime (Delphi)]]'''
Uses:
*[[VCL_En:SysUtils.TrySystemTimeToDateTime|SysUtils.TrySystemTimeToDateTime]]
*[[VCL_En:SysUtils.SystemTimeToDateTime|SysUtils.SystemTimeToDateTime]]

Keep the examples in alphabetical order by name. There is a C++ section farther down the

page. The "Jump to C++ Examples" link at the top takes you there.


6. Edit this page to place your example in the Code Samples by Function index:


http://docwiki.embarcadero.com/CodeSamples/XE/en/Code_Samples_by_Function


7. Go to that page and you can see that the entry for my TrySystemTimeToDateTime example is:

[[VCL_En:SysUtils.SystemTimeToDateTime|SysUtils.SystemTimeToDateTime]] is used in
* [[TrySystemTimeToDateTime (Delphi)]]
* [[TrySystemTimeToDateTime (C++)]]
[[VCL_En:SysUtils.TrySystemTimeToDateTime|SysUtils.TrySystemTimeToDateTime]] is used in
* [[TrySystemTimeToDateTime (Delphi)]]

Keep the examples in alphabetical order by unit, class and member name.


There is only one code examples wiki, which is English.

Consult the old Weaver Code Examples wiki for more complicated situations:


http://docwiki.embarcadero.com/CodeSamples/en/Main_Page

8. Remember to mention the API members that you are featuring in your code example. When referencing them, mention the unit and class they belong to. Users are looking at these examples without a debugger, and declarations of these objects may be up in the TForm declaration and not appear in your snippet.

9. Also add links to your featured API member pages in the Uses clause (#3 above) and corresponding links in those API pages back to your example:

==Code Samples==
*[[samp_xe:TrySystemTimeToDateTime (Delphi)|TrySystemTimeToDateTime (Delphi)]]
*[[samp_xe:TrySystemTimeToDateTime (C++)|TrySystemTimeToDateTime (C++)]]
Personal tools