Code( )

Parent Previous Next

Code( )


Specifies the content as code and provides indentation. If using the optional code type argument, then it will also provide syntax highlighting based on the given code type.


Syntax


Code([<code type>, ]<content item>);



Arguments

code type - Any code type from the following table:


Code Type Term

Language

Highlighting

Reformatting

SQL

T-SQL

Yes

No

VB

Visual Basic .NET

Yes

No

CS

C#

Yes

No

XML

XML

Yes

No

FormattedXML

XML

Yes

Yes


If the code type is omitted, then the output is emitted in a monospace font, but no highlighting or reformatting is applied.


content item – the content item to format


Examples


Code(@PropertyValue('DdlScript'));




Code(SQL, @PropertyValue('DdlScript'));