Problem using ArraySelectedBuild

Dear Jim & Dave, Trying to use ArraySelectedBuild to get a macro working in PanX that ran in Pan6 using the Unimplemented ArrayLineBuild.
I get an error message in PanX saying “ArraySelectedBuild statement must have at least 4 parameters, not 3”.
The code I tried in the PanX macro is below.
Addname=Name Select Name=Addname If info(“Selected”)≠1 Message “Problem with Name” Stop Endif
;ArrayLineBuild NColorList,¶,"",arrayscan(Colors,",")["!–,/-ÿ","-!–,/-ÿ"]
ArraySelectedBuild NColorList,¶,"",arrayscan(Colors,",")["!–,/-ÿ","-!–,/-ÿ"]

I keep seeing 4 parameters. Can you guys suggest what I did wrong? Thanks, George

The arrayscan( function isn’t supported in Panorama X. I don’t know why the error message isn’t telling you that instead of the four parameters thing.

Your fourth parameter is a function that does not exist in Pan X.

Dear Dave & Jim,
Now resuming work on PanX conversion where I left off back in the fall (to handle deadlines here). Have run into 3 problems while trying to make a work-around for the unsupported ArrayLineBuild and arrayscan statements.
• info("selected) triggers error message “unknown statement: selected”, though this statement is supported.
•Error message persists even after suppressing the problem line using either “;” or //. Are these tools for suppressing sections no longer working? Having to delete problem code completely before it is solved would be chaotic.
• Tried to activate Advanced Error Dialog in PanX Preferences, & studied the ErrorWizard help sheet that describes what we should be seeing, but none of these things occur when an error is generated.
An example of a problem procedure is copied below. Can you guys advise how to get a handle on these issues? Thanks, George Park

global ThisBid ThisBid=info(“DatabaseName”)
DEBUG
Global Addname,sseries,fform,ggen,sepp,vvar,ggss,ddo,ccro,ssdfmm,pper,ccont,uus,ccols,OColorList,NColorList,
OOColorList,NNColorList,NDColorList,ODColorList,NamArr,ActiveColorList,ActiveDColorList
NColorList="

NColorList=Colors
Addname=Name Select Name=Addname If info(“selected”)≠1 Message “Problem dupe Name?” Stop Endif
;ArrayLineBuild NColorList,¶,"",arrayscan(Colors,",")["!–,/-ÿ","-!–,/-ÿ"]
;ArraySelectedBuild NColorList,¶,“BidSeries”,arrayscan(Colors,",")["!–,/-ÿ","-!–,/-ÿ"]

ArrayFilter NColorList,NColorList,¶,?(import() contains "(priced separately)","",import())
arraystrip NColorList,¶
ArraySort NColorList,NColorList,¶
ArrayDeDuplicate NColorList,NDColorList,¶ If NDColorList≠NColorList 
Dummy= sandwich("",Dummy,"-")+"DupeCol" Endif
ArrayFilter NColorList,NColorList,¶,?(import() contains "(",import()[1,"("][1,-3],import())
If do contains "x" NColorList="" Endif

Addname=Name ggen=Genus sseries=Series fform=SdFm sepp=SepPr vvar=Variety ggss=GSS+SepPr ccols=Colors
ShowVariables Addname
ddo=do ccro=«CropCat» ssdfmm=«SeedForm» pper=«Per» ccont=«Cont» uus=Uses
;DEBUG
ArrayBuild NamArr,¶,“NumbAss”,?(Name=Addname,Name,"") ShowVariables NamArr
Case NamArr="" Dummy= sandwich("",Dummy,"-")+“NNF” Rtn
Case arraysize(NamArr,¶)>1 Dummy= sandwich("",Dummy,"-")+“DupeNam” EndCase
ArrayBuild OColorList,¶,“NumbAss”,?(GSS=ggss and ColorTime≠"x",ColorTime,"")
ArraySort OColorList,OColorList,¶
ArrayDeDuplicate OColorList,ODColorList,¶
ArrayBuild ActiveColorList,¶,“NumbAss”,?(GSS+SepPr=ggss and ColorTime≠"x" and do notcontains “x”
and SepPr≠"-",ColorTime,"")
ArraySort ActiveColorList,ActiveColorList,¶ ArrayStrip ActiveColorList,¶
ArrayDeDuplicate ActiveColorList,ActiveDColorList,¶
ShowVariables ActiveColorList,NColorList,NDColorList,OColorList
If ODColorList≠OColorList Dummy=sandwich("",Dummy,"-")+“DupeOldCol” Endif
If ActiveDColorList≠ActiveColorList Dummy=sandwich("",Dummy,"-")+“DupeActiveCol” Endif
If ActiveColorList≠NColorList Dummy=sandwich("",Dummy,"-")+“CNM” Endif

Change that line to NColorList="" and the whole thing compiles. Without that second quote, it went looking for a closing quote and found it in the first quote of info("selected"). Everything between those quotes was interpreted as a text constant, including info(. Selected was then interpreted as the start of the next statement, and there is no statement named selected.

Dear Dave,
Thank you for amazing service. My error was so simple - but hard for me to catch since the eye surgery.
We’ll revert to the use of Advanced Error Dialog next week.
Have a great weekend, George

Great catch Dave!

George, for future reference, when you want to paste code into the forum, first select it, then choose Source>Copy Indented Code. Then paste it into the forum. It will look much nicer in the forum if you do that.

1 Like

Dear Dave & Jim,
Thanks for the CopyIndentedCode tip.
2 more issues:
•• Tried to activate Advanced Error Dialog in PanX Preferences, & studied the ErrorWizard help sheet that describes what we should be seeing, but none of these things occur when an error is generated.
•• I’m having trouble getting the Single Step tool to work when debugging. The tool is not present in the Program menu, though it used to be there. I used the Customize Toolbar window to drag the Single Step tool into the Toolbar, and the icon shows up there, but it does not work: clicking on the icon only highlights the first step in the procedure and won’t move on from there. The single step icon still does not appear in the Program menu, only the Run and CheckProcedure choices are present there. I reinstalled PanX, but none of the above changed.
Your help is most appreciated, George

The Advanced Error Dialog applies only to errors in the execution of the procedure, not to errors that keep it from compiling.

If there is an error in execution, and the procedure window is open, it will bring that window to the front and highlight the error, rather than open the dialog.

That tool was removed because it was never implemented. Panorama X has a new feature to help with debugging.

How was Single Step available in Customize Toolbar? (I don’t find that option.)

The icon is still available in the (custom) toolbar of procedure windows.