Syntax Highlighing:
comments, key words, predefined symbols, class members & methods, functions & classes
# DB_READ1.sml
# sample script for tutorial "Writing Scripts with SML".
# Demonstrates simple syntax for read attribute values from records
# attached to vector elements.
# version 13 November 2009
clear();
PopupMessage("Select sf_data/HAYWSOIL/hsoils");
class RVC_VECTOR V;
numeric i, acres;
class STRING type$;
GetInputVector(V);
for i = 1 to V.$Info.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);
}
print("Done.");