PxPlus User Forum

Main Board => Discussions => Language => Topic started by: James Zukowski on August 06, 2026, 05:33:10 PM

Title: XEQ() generating unexpected Error#22
Post by: James Zukowski on August 06, 2026, 05:33:10 PM
I'm trying to use XEQ() to process a CALL, but am receiving Error#22:

Quote-}call "Check_Access","ADMIN",OK
-}?ok
1
-}?xeq("Check_Access",OK,"ADMIN",OK)
Error #22: Invalid compound statement
-}

I've changed OK to OK$ in the CALL and the ENTER, thinking the return arg needed to be a string, but no change.

Any ideas?

Same results in v15.1 and v22.1.
Title: Re: XEQ() generating unexpected Error#22
Post by: EVa on August 07, 2026, 04:10:20 AM
You can't use XEQ() in console mode.

->delete
->10 ! Check_Access
-:20 enter (name$),result
-:30 result=1
-:40 stop
-:save "Check_Access
D:\PvxPlus2300\misc\Check_Access
->call "Check_Access","ADMIN",OK
->print ok
1
->delete
->10 print xeq("Check_Access",OK,"ADMIN",OK)
-:run
1
-:print xeq("Check_Access",OK,"ADMIN",OK)
Error #22: Invalid compound statement
Title: Re: XEQ() generating unexpected Error#22
Post by: James Zukowski on August 07, 2026, 10:51:57 AM
Yep, that's it.

General note (to the powers that be): Identifying when a function is not available in command mode and/or having a table/list of these functions would likely be beneficial.