1 include : $"dbf.g"
2 //include : $"..\Gentee Language\Libraries\dbf\dbf.g"
3
4 func main<main>
5 {
6 dbf base
7 uint i num
8 datetime dt
9 str sname sdate
10
11 print("0\n")
12 base.create( "base.dbf", "ID,N,2,0
13 NAME,C,30,0
14 DATE,D,8,0", 1 )
15 print("1\n")
16 fornum i, 10
17 {
18 base.append()
19 num = base.recno()
20 base.fw_int( num, 1 )
21 base.fw_str("Record \( num )", 2 )
22 dt.gettime()
23 base.fw_date( dt, 3 )
24 }
25 print("---------------\nCount of records = \(*base)\n---------------\n")
26 foreach cur,base
27 {
28 print("ID = \( base.f_int( 1 )) Name = \( base.f_str( sname, 2 ))
29 \# Date = \( base.f_date( sdate, 3 ))\n")
30 }
31 print("Press any key...")
32 getch()
33 return
34 }
35