EnglishРусский  

   ..

   csv.g

   dest.csv

   example.g

   src.csv

The project is closed! You can look at a new scripting language. It is available on GitHub.
Also, try our open source cross-platform automation software.

Ads

Installer and installation software
Commercial and Freeware installers.

source\lib\csv\example.g
 1 include {
 2 	"csv.g"
 3 }
 4 
 5 func ex_csv<main>
 6 {
 7  	csv src_csv, dest_csv
 8 	uint i
 9 
10    src_csv.read( "src.csv")
11 	src_csv.settings( ';', '#', '#' )
12    foreach ar, src_csv
13    {
14 		print( "---------------------------------------------\l" )
15     	fornum i=0, *ar
16 		{
17 			print( ar[i] + "\l" )
18 		}
19 		dest_csv.append( ar )
20 	}
21 	dest_csv.write( "dest.csv" )	
22    print( "Press any key" )
23    getch()
24 } 
25 /*   str out
26    uint i
27    fornum i, 1000
28    {
29       uint k
30       str  line = "Line \(i)"
31       fornum k, 10
32       { 
33          if k & 1 : line += ",\"Column, comma \( k )\""
34          else : line += ",Column \( k )"
35       }
36       out += "\(line)\l"
37    }
38    out.write("test.csv")
39    return*/
40