#tempErrReadArray := ReadFromArrayDB(db:=#recipeList, index:=#temp_J, value=>#tempRecipe);执行 这句时老是报错8154数据类型不对
IF #excute=FALSE THEN
// Statement section IF
RETURN;
END_IF;
REGION RecipeNameToFind 是否有效
//如果“recipeName”为空退出
IF LEN(#recipeNameToFind) = 0 THEN
REGION 出错处理1
#done := FALSE;
#errorCode := 16#9001; //未输入配方名
#indexInList:=-1;
END_REGION
RETURN;
END_IF;
END_REGION
REGION 遍历查找所有配方
// Statement section REGION
FOR #temp_J := 0 TO #max DO
// Statement section FOR
#tempErrReadArray := ReadFromArrayDB(db:=#recipeList, index:=#temp_J, value=>#tempRecipe);
IF #tempErrReadArray=0 THEN
// Statement section IF
IF #tempRecipe.ProductionName = #recipeNameToFind AND #tempRecipe.RecipeValid THEN
// Statement section IF
VariantPut(SRC:=#tempRecipe,
DST:=#recipeOut);
#done := TRUE;
#errorCode := 16#0;
#error := FALSE;
#indexInList := #temp_J;
RETURN;
END_IF; ;
ELSE
REGION 出错处理3
// Statement section REGION
#done := FALSE;
#errorCode := INT_TO_WORD(#tempErrReadArray);
//数据处理时异常
#error := true;
#indexInList := -1;
END_REGION
END_IF;
END_FOR;
END_REGION
