HP Forums

Full Version: broke subroutine
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This program:

PHP Code:
EXPORT test()
BEGIN
 LOCAL a
bdatalist;
 
datalist := {
  {
'a', [0], {65300}},
  {
'b', [0], {65301}}};
  
INPUT(
   EVAL(
datalist),
   
"title");
 RETURN {
ab};
END

works on version 2.1.14433 but doesn't work on version 2.1.14592

Did something change with either INPUT or EVAL to cause this? This is a simplified version of a larger subroutine to demonstrate the issue. I use the larger subroutine a lot.

-road
ps, it dies on the input statement with the message "test Error: Invalid Input"

[attachment=9679]

-road
Hello,
Sorry, in french , but my english is bad.

Il manque une accolade ouvrante après datalist:=
albud44,

Thanks for your reply.

I don't think that's the problem. If the braces didn't match it would not compile. Also, the exact same program works with one version and not the other.

Merci pour votre réponse. Je ne pense pas que ce soit le problème. Si les accolades ne correspondaient pas, il ne serait pas compilé. En outre, le même programme fonctionne exactement avec une version et pas l'autre.

-road
(07-24-2021 11:47 AM)roadrunner Wrote: [ -> ]albud44,

Thanks for your reply.

I don't think that's the problem. If the braces didn't match it would not compile. Also, the exact same program works with one version and not the other.

Merci pour votre réponse. Je ne pense pas que ce soit le problème. Si les accolades ne correspondaient pas, il ne serait pas compilé. En outre, le même programme fonctionne exactement avec une version et pas l'autre.

-road

It works fine on my iPad version 2.1.14584
Hmmm,

Something must have changed between 2.1.14584 and 2.1.14592. Thanks for the info.

-road
Well, it works also on the Android app version 2.1.14591 (2021 05 14). But the IOS and Android apps don't implement the latest software changes, they have just been updated for the latest stores/tools requirements.

I don't know why it was working initially because when you do
datalist := {
{'a', [0], {65, 30, 0}},
{'b', [0], {65, 30, 1}}};

you get {a, [0], {65, 30, 0}}, {b, [0], {65, 30, 1}}} in datalist, without the quotes around a and b.

And when you do EVAL(datalist) then a and b are evaluted to their value which is 0, so you get {0, [0], {65, 30, 0}}, {0, [0], {65, 30, 1}}} which is not a valid parameter for INPUT.
(07-24-2021 06:53 PM)Didier Lachieze Wrote: [ -> ]I don't know why it was working initially

I'm thinking there was a bug that allowed me to do that, and the latest update fixed the bug Smile but broke my subroutine Sad

Anyway, have a workaround but it involves a lot of cutting and pasting.

Thanks everyone for your input.

-road
Reference URL's