<h2>JavaScript</h2>
<pre class="javascript">
// this is a "comment"
/* so is this */
var string = "/* string */";
alert('Hello \'Dean\'!'); function getText(a, b, c) { if (a && b) return a + b + c.toString();
};
</pre>
<h2>Email/Discussion</h2>
<pre class="email">
So said the script writer:
> I like *bold* text! :-)
>
> But the other man said:
>> I like /italicised/ text. :(
>>
>> A third fellow chimed in:
>>> I think _underlined_ text should suit you both. ;-)
>>>
>> _Hey_! He's right! :-)
> _Groovy_. ;-)
</pre>
<h3>VBScript</h3>
<pre class="vbscript">
Rem this is a "comment"
' so is this
Function MyHex(ByVal Number) Dim Sign
Const HexChars = "0123456789ABCDEF"
Sign = Sgn(Number)
Number = Fix(Abs(CDbl(number))) If Number = 0 Then
MyHex = "0"
Exit Function End If
While Number > 0
MyHex = Mid(HexChars, 1 + (Number - 16 * Fix(Number / 16)), 1) & MyHex
Number = Fix(Number/16)
WEnd If Sign = -1 Then MyHex = "-" & MyHex End Function
</pre>
<h3>T-SQL</h3>
<pre class="tsql"> CREATE PROC nth (
@table_name sysname,
@column_name sysname,
@nth int
)
AS BEGIN
--Date written: December 23rd 2000
--Purpose: To find out the nth highest number in a column.
SET @table_name = RTRIM(@table_name)
SET @column_name = RTRIM(@column_name)
DECLARE @exec_str CHAR(400)
IF (SELECT OBJECT_ID(@table_name,'U')) IS NULL BEGIN
RAISERROR('Invalid table name',18,1)
RETURN -1 END
</pre>
</body>
</html>