共同学习SPS,掌握Csgl#,FireScript孵化纪实

——基于.NET脚本解释引擎,可以用于ASP.NET,WinForm,WebServices

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

 

 1 using System.Data
 2 print( " OK le  " )
 3
 4 loadLib( " C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll " )
 5 a = new  DataTable()
 6 c1  = new  DataColumn( " c1 " )
 7 a.Columns.Add(c1)
 8
 9 c2  = new  DataColumn( " c2 " )
10 a.Columns.Add(c2)
11
12 c3  = new  DataColumn( " c3 " )
13 a.Columns.Add(c3)
14 print(a.GetType())
15 b = a.NewRow()
16 b[ 0 ] = " ni hao  "
17 b[ 1 ] = " you hao  "
18 b[ 2 ] = " hello world "
19 print( "  o kle  " )
20 c = a.Rows
21 print(b)
22 print(b[ 0 ])
23 print(b[ 1 ])
24 print(b[ 2 ])
25  
26 c.Add(b)
27 print(c.Count)
28 function  PrintTable(table)
29 {
30  
31 print( " 表一共有 " + a.Rows.Count + " " )
32      for (i = 0 ;i < a.Rows.Count;i = i + 1 )
33     {
34     print(a.Rows[i])
35          for (j = 0 ;j < a.Columns.Count;j = j + 1 )
36          {
37      
38         print( " " + i + " , " + j)
39  
40                 print(a.Rows[i][j])
41         }

42
43    }

44
45  
46 }

47 PrintTable(a)
posted on 2006-03-22 15:58  FireReprt◇FireScript地带  阅读(349)  评论(1编辑  收藏  举报