PointOfLight
10-05-2006, 09:52 PM
It appears there is a bug in the ListToStruct routine. If there are not enough elements in the list to populate the struct, PPL generates a access violation error. Here's some code to validate the error:
list(opt$);
add(opt$, "bob");
add(opt$, "fred");
add(opt$, "wilma");
//add(opt$, "turkey");
struct(vals$, "a", "b", "c", "d");
ListToStruct(opt$, &vals$);
clear(opt$);
If you uncomment the last add line, this code works fine.
list(opt$);
add(opt$, "bob");
add(opt$, "fred");
add(opt$, "wilma");
//add(opt$, "turkey");
struct(vals$, "a", "b", "c", "d");
ListToStruct(opt$, &vals$);
clear(opt$);
If you uncomment the last add line, this code works fine.