updateRecord.sml

  Download

More scripts: Vector

Syntax Highlighing:

comments, key words, predefined symbols, class members & methods, functions & classes
            
# Write a numeric value directly specifying the fieldname, recordNum, and value to write
func updateRecord(class Vector V, string tableType, string tableName, numeric recordNum, string fieldname, numeric value)
{
	if(tableType=="point")
	{
		V.point.(tableName)[@recordNum].(fieldname) = value;
		return 1;
	}
	else if(tableType=="line")
	{
		V.line.(tableName)[@recordNum].(fieldname) = value;
		return 1;
	}
	else if(tableType=="poly")
	{
		V.line.(tableName)[@recordNum].(fieldname) = value;
		return 1;
	}
	else return 0;
}