1
%%=====================================================
2
% MATLAB test code for Kate/Kwrite syntax highlighting
4
%%=====================================================
6
% Numbers _____________________________________________
7
5, 5.5, .1, 0.1, 0.4e5, 1.2e-5, 5i, 5.3i, 6j, .345+3i
8
5', 5.5', .1', 0.1', 0.4e5', 1.2e-5', 5i', 5.3i', 6j', .345+3i'
10
% Operators ___________________________________________
11
% relational operators
12
'asdf'~=4, c<=4, d>=4, a<b, a>b, a==b, b||c, b&&c
13
% elementwise arithmetic operators
14
a.^b, a.*b a./b, 1:4:5
15
% single-character binary arithmetic
16
a+3, a-3, a*2, a^3, a/3, a\3, a|b, a&b
18
a = ~g; g = @sfdgdsf(sdfsd,345); g.' + 1i.' - ('asdf').'
19
% separators and delimiter
20
(asd),[sadf];{asdf},;;,;;;()
25
% Strings and adjoint _________________________________
31
'string' % simple string
32
'''' % string containing '
33
'str''ing' % one string containing '
34
'string' 'string' % two strings
35
'asdf' 'asdf''' variable % two strings and a variable
36
'asdf''asdf'' fsgdfg' + (asdf)' - 'asdf'.' + []''''.';''
37
'sadf'.' % string transpose
42
'' var''' % empty string, var with >1 adjoints
43
[5]'*{5}'*('asd')'.'+(5)'*6'*asdf'*asdf'.' % many adjoints
46
A.'.'*B + 1 % double transpose
47
A'.' + 1 % adjoint, then transpose
48
A.'' % transpose, then adjoint
50
% System command ______________________________________
54
% Reserved keywords ___________________________________
55
function, persistent, global
56
switch, case, otherwise
59
for, while, break, continue
61
function, FUNCTION, Function % case sensitive!
b'\\ No newline at end of file'