DATABASE.sml

  Download

More scripts: Vector

Syntax Highlighing:

comments, key words, predefined symbols, class members & methods, functions & classes
            
# Database.sml
# sample script for tutorial "Writing Scripts with SML".
#
clear();
PopupMessage("Select sf_data/HAYWSOIL/hsoils");
vector V;
numeric numpolys, i, acres;
string type$;
GetInputVector(V);
numpolys = NumVectorPolys(V);
for i = 1 to numpolys{
	acres = V.poly[i].SoilType.Acres;
	type$ = V.poly[i].Wildlife.SoilName$;
	printf("Polygon # %d: Soil type = %s, acres = %d\n",i,type$,acres);
}