HP Forums
Bug?Android: two procedures in a file won't select exported 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: Bug?Android: two procedures in a file won't select exported subroutine (/thread-4594.html)



Bug?Android: two procedures in a file won't select exported subroutine - StephenG1CMZ - 08-29-2015 07:33 AM

I've got a file with a main procedure calling a subroutine. If both are EXPORT, I see an option to Run two procedures, but both have the name of the file/main procedure. Whether I tap 1 or 2, the main procedure rather than its subroutine executes.

EXPORT DD(parameters)
BEGIN
// draw rectangle
END
EXPORT MAIN
BEGIN
// for loop draw several rectangles using DD
END

It seems to me the Android version should be showing DD and MAIN as runnable, instead it is showing MAIN twice and asking which one to run.


RE: Bug?Android: two procedures in a file won't select exported subroutine - Tim Wessman - 08-30-2015 01:32 AM

Do you have ; after each end? Just a thought. Don't know if it would impact anything.


EXPORT DD(parameters)
BEGIN
// draw rectangle
END; // <----
EXPORT MAIN
BEGIN
// for loop draw several rectangles using DD
END; // <----


RE: Bug?Android: two procedures in a file won't select exported subroutine - StephenG1CMZ - 08-30-2015 08:08 AM

(08-30-2015 01:32 AM)Tim Wessman Wrote:  Do you have ; after each end? Just a thought. Don't know if it would impact anything.


EXPORT DD(parameters)
BEGIN
// draw rectangle
END; // <----
EXPORT MAIN
BEGIN
// for loop draw several rectangles using DD
END; // <----

Yes, and brackets after MAIN, sorry I omitted them here.
I've now taken out all the inner code, so you just have the standard EXPORT MAIN...END; preceded by a similar EXPORT DD...END; and the same thing happens.


RE: Bug?Android: two procedures in a file won't select exported subroutine - StephenG1CMZ - 08-30-2015 08:46 PM

If I switch to home and use the toolbox/User programs, I see DD and MAIN as expected. It's when I've finished editing that I see MAIN or MAIN.


RE: Bug?Android: two procedures in a file won't select exported subroutine - StephenG1CMZ - 09-04-2015 07:32 PM

Code:

EXPORT DD ()
BEGIN

END;

EXPORT TRY()
BEGIN

END;
Although the trivial example described above still doesnt show DD after editing (only from Home), whilst coding a more complete program I am often seeing more than one exported function after editing, as expected. I'm not sure exactly what change causes it to show/not show.