Index: cpp/frams/genetics/genman.cpp
===================================================================
--- cpp/frams/genetics/genman.cpp	(revision 515)
+++ cpp/frams/genetics/genman.cpp	(revision 516)
@@ -467,5 +467,5 @@
 void GenMan::p_getsimplest(ExtValue *args, ExtValue *ret)
 {
-	int format = args[0].getInt() + 48;
+	int format = GenoObj::formatFromExtValue(args[0]);
 	if (!getOper_f(format))
 		ret->setEmpty();
Index: cpp/frams/vm/classes/genoobj.cpp
===================================================================
--- cpp/frams/vm/classes/genoobj.cpp	(revision 515)
+++ cpp/frams/vm/classes/genoobj.cpp	(revision 516)
@@ -15,5 +15,5 @@
 	{ "rawgenotype", 0, PARAM_NOSTATIC | PARAM_READONLY, "Raw genotype", "s 1", GETONLY(genotype), "Genotype, excluding the format specifier" },
 	{ "info", 0, PARAM_NOSTATIC, "Info", "s 1", GETSET(info), "Additional information or comments", },
-	{ "format", 0, PARAM_NOSTATIC | PARAM_READONLY, "Format", "d", GETONLY(format), "Genotype format", },
+	{ "format", 0, PARAM_NOSTATIC | PARAM_READONLY, "Format", "s", GETONLY(format), "Genotype format", },
 	{ "genotype", 0, PARAM_NOSTATIC | PARAM_READONLY, "Genotype", "s 1", GETONLY(string), "Genes as a string of characters", },
 	{ "isValid", 0, PARAM_NOSTATIC | PARAM_READONLY | PARAM_DEPRECATED, "Valid", "d 0 1", GETONLY(isvalid), "Use 'is_valid' instead of 'isValid'." },
@@ -23,9 +23,9 @@
 	"-1 = validity is not known. This is a transient state. The value of \"is_valid\" will never be -1 when read. It is safe to treat is_valid as boolean in statements like \"if (g.is_valid) ...\". Setting \"is_valid=-1\" will make it 0 or 1 again. This third state (-1) is only needed for loading Genotype objects from files where the \"is_valid\" field might not be present."
 	},
-	{ "getConverted", 0, PARAM_NOSTATIC, "get converted genotype", "p oGeno(d format)", PROCEDURE(p_getconvert), },
+	{ "getConverted", 0, PARAM_NOSTATIC, "get converted genotype", "p oGeno(s format)", PROCEDURE(p_getconvert), },
 	{ "f0genotype", 0, PARAM_NOSTATIC | PARAM_READONLY, "f0 genotype", "s 1", GETONLY(f0genotype), "converted to f0 genotype", },
 	{ "new", 0, 0, "create new empty object", "p oGeno()", PROCEDURE(p_new), },
 	{ "newFromString", 0, 0, "create new object from supplied string argument", "p oGeno(s genotype)", PROCEDURE(p_newfromstring), },
-	{ "newFrom", 0, 0, "create new object", "p oGeno(s genotype,d format,s name,s description)", PROCEDURE(p_newfrom), },
+	{ "newFrom", 0, 0, "create new object", "p oGeno(s genotype,s format,s name,s description)", PROCEDURE(p_newfrom), },
 	{ "autoname", 0, PARAM_NOSTATIC | PARAM_READONLY, "Autogenerated name", "s", GETONLY(autoname), },
 	{ "toVector", 0, PARAM_READONLY | PARAM_NOSTATIC, "serialization support", "oVector", GETONLY(toVector), },
@@ -85,5 +85,6 @@
 void GenoObj::get_format(ExtValue *ret)
 {
-	ret->setInt(getFormat());
+	char format_as_string[2]={getFormat(),0};
+	ret->setString(format_as_string);
 }
 
@@ -99,7 +100,20 @@
 }
 
+char GenoObj::formatFromExtValue(ExtValue& v)
+{
+if (v.getType()==TInt)
+	return v.getInt();
+if (v.getType()==TString)
+	{
+	SString s=v.getString();
+	if (s.len()==1)
+		return s.charAt(0);
+	}
+return Geno::INVALID_FORMAT;
+}
+
 void GenoObj::p_getconvert(ExtValue *args, ExtValue *ret)
 {
-	*ret = makeDynamicObjectAndDecRef(new Geno(getConverted((char)args[0].getInt())));
+	*ret = makeDynamicObjectAndDecRef(new Geno(getConverted(formatFromExtValue(args[0]))));
 }
 
@@ -116,5 +130,5 @@
 void GenoObj::p_newfrom(ExtValue *args, ExtValue *ret)
 {
-	*ret = makeDynamicObjectAndDecRef(new Geno(args[3].getString(), (char)args[2].getInt(),
+	*ret = makeDynamicObjectAndDecRef(new Geno(args[3].getString(), formatFromExtValue(args[2]),
 		args[1].getString(), args[0].getString()));
 }
Index: cpp/frams/vm/classes/genoobj.h
===================================================================
--- cpp/frams/vm/classes/genoobj.h	(revision 515)
+++ cpp/frams/vm/classes/genoobj.h	(revision 516)
@@ -38,4 +38,5 @@
 	static Geno* fromObject(const ExtValue& v, bool warn = true);
 	static ParamInterface* getInterface();
+	static char formatFromExtValue(ExtValue& v);
 
 	static Param& getStaticParam();
