PageRenderTime 14ms CodeModel.GetById 2ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/octave/types_directive_runme.m

#
Objective C | 15 lines | 11 code | 4 blank | 0 comment | 4 complexity | 3972447ee1873ae60d6937e11f574673 MD5 | raw file
 1types_directive
 2
 3d1 = Time1(2001, 2, 3, 60);
 4newDate = add(d1, 7); # check that a Time1 instance is accepted where Date is expected
 5if (newDate.day != 10)
 6  error
 7endif
 8
 9d2 = Time2(1999, 8, 7, 60);
10newDate = add(d2, 7); # check that a Time2 instance is accepted where Date is expected
11if (newDate.day != 14)
12  error
13endif
14
15