1 /******************************************************************************
2 *
3 * Copyright (C) 2005, The Gentee Group. All rights reserved.
4 * This file is part of the Gentee open source project - http://www.gentee.com.
5 *
6 * THIS FILE IS PROVIDED UNDER THE TERMS OF THE GENTEE LICENSE ("AGREEMENT").
7 * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE CONSTITUTES RECIPIENTS
8 * ACCEPTANCE OF THE AGREEMENT.
9 *
10 * ID: multitable 17.10.06 0.0.A.
11 *
12 * Author: Alexey Krivonogov ( gentee )
13 *
14 ******************************************************************************/
15
16 text multitable
17 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
18 <HTML><HEAD><TITLE>Multiplication Table</TITLE>
19 <STYLE TYPE="text/css">
20 <!--
21 BODY {background: #FFF; text-align: center;}
22 TABLE {border-collapse: separate;}
23 TABLE,TD,TH {border: 1px solid gray;}
24 TD, TH {padding: 3px; width: 50px; text-align: center;}
25 TH {background: #BBB;}
26 -->
27 </STYLE>
28 </HEAD>
29 <BODY>
30 <TABLE ALIGN=CENTER><TR><TH> \{
31
32 uint i j
33 for i = 1, i < 10, i++
34 {
35 @"<TH>\(i)"
36 }
37 for i = 1, i < 10, i++
38 {
39 @"\l<TR><TH>\(i)"
40 for j = 1, j < 10, j++
41 {
42 @"<TD>\( i * j )"
43 }
44 }
45 }\l</TABLE><BR>
46 Generated with Gentee Programming Language
47 </BODY></HTML>\!
48
49 func main< main >
50 {
51 str out
52
53 out @ multitable()
54 out.write( "mtable.htm" )
55 shell( "mtable.htm" )
56 }
57
Редактировать