PxPlus User Forum

Main Board => Discussions => Language => Topic started by: Jeff Wilder on October 10, 2019, 09:22:49 AM

Title: Error 49
Post by: Jeff Wilder on October 10, 2019, 09:22:49 AM
Hello,
I receive an error 49 at line 0070 when the IT system parameter is enabled.  Is this a bug or am I using the LIKE operator improperly? I have switched my statements to use MSK() instead and all is working, but I am wondering the cause of the error.

The TL parameter is off. I have tested in PxPlus version 15 and 16.

Thanks,
Jeff

Code: [Select]
0010 BEGIN
0020 SET_PARAM 'IT'=0
0030 WHILE (X++<2)
0040 LET R$="[0-9]"
0050 LET V$="2"
0060 IF MSK(V$,R$) THEN PRINT "true" ELSE PRINT "false"
0070 IF V$ LIKE R$ THEN PRINT "true" ELSE PRINT "false"
0080 SET_PARAM 'IT'=1
0090 WEND
0100 END

Code: [Select]
-:run
true
true
true
0070 IF V$ LIKE R$ THEN PRINT "true" ELSE PRINT "false"
Error #49: <*> Internal program format error <*>
Current program is <unsaved>, line 70
1:
Title: Re: Error 49
Post by: Jeff Wilder on October 10, 2019, 09:53:42 AM
I also found that if the line contains a function or another conditional, it passes without error.

For example, these work in the program above:
Code: [Select]
0070 IF STP(V$) LIKE R$ THEN PRINT "true" ELSE PRINT "false"
or
Code: [Select]
0070 IF NUL(V$) OR V$ LIKE R$ THEN PRINT "true" ELSE PRINT "false"
Title: Re: Error 49
Post by: Mike King on October 16, 2019, 05:11:54 PM
Jeff

Thanks for bringing this to our attention.  You should be able to put the LIKE compare inside parenthesis and it will work.

We will address this on the next build.
Title: Re: Error 49
Post by: Len Vassos on December 04, 2019, 09:38:38 AM
Jeff,

This issue has been resolved and is now available on PxPlus 2019 Update 2 (v16.20)