Index: cpp/frams/Makefile-SDK
===================================================================
--- cpp/frams/Makefile-SDK	(revision 306)
+++ cpp/frams/Makefile-SDK	(revision 307)
@@ -5,5 +5,5 @@
 include frams/Makefile-SDK-files
 
-SDK_TESTS=genoconv_test genomanipulation geno_test genooper_test genooper_test_fTest neuro_test loader_test serial_test multiline_f0_test f0_variants_test full_props shapeconvert part_shapes neuro_layout_test geometry_apices_test geometry_info_test geometry_surface_test geometry_volume_test
+SDK_TESTS=genoconv_test genomanipulation geno_test genooper_test genooper_test_fTest neuro_test loader_test loader_test_param serial_test multiline_f0_test f0_variants_test full_props shapeconvert part_shapes neuro_layout_test geometry_apices_test geometry_info_test geometry_surface_test geometry_volume_test
 
 sdk_tests: $(SDK_TESTS)
@@ -34,4 +34,7 @@
 loader_test: $(LOADER_TEST_OBJS)
 	$(CXX) $(LOADER_TEST_OBJS) $(LDFLAGS) -o $@
+
+loader_test_param: $(LOADER_TEST_PARAM_OBJS)
+	$(CXX) $(LOADER_TEST_PARAM_OBJS) $(LDFLAGS) -o $@
 
 serial_test: $(SERIAL_TEST_OBJS)
Index: cpp/frams/Makefile-SDK-files
===================================================================
--- cpp/frams/Makefile-SDK-files	(revision 306)
+++ cpp/frams/Makefile-SDK-files	(revision 307)
@@ -33,4 +33,6 @@
 LOADER_TEST_OBJS=frams/_demos/genotypeloader.o frams/_demos/loader_test.o frams/virtfile/virtfile.o frams/param/multiparamload.o frams/virtfile/stdiofile.o $(SDK_OBJS) $(GENOCONV_SDK_OBJS)
 
+LOADER_TEST_PARAM_OBJS=frams/_demos/loader_test_param.o frams/virtfile/virtfile.o frams/param/multiparamload.o frams/virtfile/stdiofile.o frams/errmgr/stdouterr.o $(SDK_OBJS)
+
 GENOCONV_TEST_OBJS= frams/_demos/genoconv_test.o frams/_demos/printconvmap.o frams/errmgr/stdouterr.o frams/virtfile/virtfile.o  $(SDK_OBJS) $(GENOCONV_SDK_OBJS)
 
Index: cpp/frams/_demos/loader_test_param.cpp
===================================================================
--- cpp/frams/_demos/loader_test_param.cpp	(revision 307)
+++ cpp/frams/_demos/loader_test_param.cpp	(revision 307)
@@ -0,0 +1,85 @@
+// This file is a part of Framsticks SDK.  http://www.framsticks.com/
+// Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
+// See LICENSE.txt for details.
+
+#include "genotypeloader.h"
+#include <frams/virtfile/stdiofile.h>
+#include <frams/errmgr/stdouterr.h>
+
+/**
+ @file
+ Sample code: Loading framsticks "objects" (well... structs)
+
+ \include loader_test_param.cpp
+ */
+
+struct Data
+{
+public:
+	SString text, longtext;
+	int i1, i2, i3;
+	float f1, f2, f3;
+	ExtValue x;
+};
+
+#define FIELDSTRUCT Data
+ParamEntry data_paramtab[] =
+{
+	{ "Data", 1, 8, "data", },
+	{ "text", 0, 0, "Text", "s 0 10", FIELD(text), }, // 10 = length limit
+	{ "longtext", 0, 0, "Long text", "s 1", FIELD(longtext), }, // 1 = multiline, 0 = unlimited
+	{ "i1", 0, 0, "Integer 1", "d", FIELD(i1), },          // unrestricted integer
+	{ "i2", 0, 0, "Integer 1", "d -5 5 1", FIELD(i2), }, // [-5..5] integer, default=1
+	{ "i3", 0, 0, "Integer 1", "d 0 3 0 ~Zero~One~Two~Three", FIELD(i3), }, // [0..3] + text labels (Param::getText())
+	{ "f1", 0, 0, "Float 1", "d", FIELD(f1), },          // unrestricted float
+	{ "f2", 0, 0, "Float 2", "f -100 100 -100", FIELD(f2), }, // [-100..100] float, default=-100
+	{ "x", 0, 0, "Untyped", "x", FIELD(x), }, // any type (class ExtValue)
+	{ 0, 0, 0, },
+};
+#undef FIELDSTRUCT
+
+int main(int argc, char*argv[])
+{
+	if (argc < 2)
+	{
+		fprintf(stderr, "Arguments: filename\n");
+		return 1;
+	}
+
+	StdioFILEDontClose virt_stderr(stderr);
+	StdoutErrorHandler error_handler(0, &virt_stderr);
+	StdioFileSystem_autoselect stdiofilesys;
+	MultiParamLoader loader(argv[1]);
+
+	Data data;
+	Param param(data_paramtab, &data);
+
+	loader.addObject(&param);
+	loader.breakOn(MultiParamLoader::OnError + MultiParamLoader::BeforeObject + MultiParamLoader::AfterObject + MultiParamLoader::OnComment);
+
+	while (int status = loader.go())
+	{
+		switch (status)
+		{
+		case MultiParamLoader::OnComment:
+			printf("comment: %s\n", (const char*)loader.getComment());
+			break;
+
+		case MultiParamLoader::AfterObject:
+			printf("loaded:\n");
+			for (int i = 0; i < param.getPropCount(); i++)
+				printf("%s=%s\n", param.id(i), (const char*)param.getText(i));
+			printf("type of 'x' is: %s\n", (const char*)data.x.typeDescription());
+			printf("-----\n\n");
+			break;
+
+		case MultiParamLoader::BeforeObject:
+			printf("----- object found, loading...\n");
+			param.setDefault(); //reset (initialize) struct contents
+			break;
+
+		case MiniGenotypeLoader::OnError:
+			fprintf(stderr, "Error: %s", (const char*)loader.getError());
+		}
+	}
+}
Index: cpp/frams/_demos/loader_test_param.in
===================================================================
--- cpp/frams/_demos/loader_test_param.in	(revision 307)
+++ cpp/frams/_demos/loader_test_param.in	(revision 307)
@@ -0,0 +1,27 @@
+#this is comment1
+# this is comment2
+data:
+text:qwerty
+longtext:~
+Long multiline text
+1\\~
+22\~
+333\ \\
+4444~
+i1:-12345
+i2:10
+i3:2
+f1:22
+f2:222
+x:3.14
+
+#all fields except x will have default values
+data:
+x:just x (string extvalue)
+
+data:
+text:abcdefghijklmnopqrstuvwxyz
+i1:uu
+i2:-99999
+i3:99999
+
