HP Forums
broke subroutine - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: broke subroutine (/thread-17280.html)



broke subroutine - roadrunner - 07-23-2021 12:41 PM

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


RE: broke subroutine - roadrunner - 07-23-2021 03:41 PM

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

[attachment=9679]

-road


RE: broke subroutine - albud44 - 07-23-2021 06:36 PM

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

Il manque une accolade ouvrante après datalist:=


RE: broke subroutine - roadrunner - 07-24-2021 11:47 AM

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


RE: broke subroutine - Terje Vallestad - 07-24-2021 01:54 PM

(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


RE: broke subroutine - roadrunner - 07-24-2021 03:41 PM

Hmmm,

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

-road


RE: broke subroutine - Didier Lachieze - 07-24-2021 06:53 PM

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.


RE: broke subroutine - roadrunner - 07-25-2021 12:14 AM

(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