RTN pausing in subroutine

92 views
Skip to first unread message

Terry Haroldson

unread,
Jun 21, 2025, 2:16:16 AMJun 21
to Free42 & Plus42
I have Plus42 installed on a PC and android phone. A strange thing is happening with Plus42 on the phone. When I run a program that calls a subroutine using XEQ, the subroutine does not return when it hits the RTN line. I noticed if I press R/S then it continues normally.
When I run the exact same program on my computer, it works properly. I also re-installed Free42 on my phone, and loaded the same program and it also works properly.

Is there a setting or flag that maybe I toggled that could cause that?

I was about to Reset Plus42 on my phone, but thought I would ask first.

Thanks for any feedback.

Terry

Vincent Weber

unread,
Jun 21, 2025, 4:03:05 AMJun 21
to Free42 & Plus42
Hi, 
I can't see that as a general problem, otherwise most of my programs wouldn't work. 
Could you list here the program you have this problem with? 
Best regards 

Vincent Weber

unread,
Jun 21, 2025, 5:59:36 AMJun 21
to Free42 & Plus42
One thing I could think of, that is not specific to Plus42 nor Free42, just the 42S: if you have a VIEW or AVIEW statement, flag 21 is set and flag 55 is not set, it will wait for you to press R/S so, that you can see the display. 

Terry Haroldson

unread,
Jun 21, 2025, 2:02:13 PMJun 21
to Free42 & Plus42
Thank you for replying. Yes, you're correct that it's related to an AVIEW statement.
The program is the 'LENG' portion of the conversion routine (from the CONVERT program by Ton van de Burgt). I have attached just the LENG portion, as that exhibits the behaviour I'm having.

I have tried various PRINT settings, but it's still failing only on my phone. Here are some screen shots....

The test I am doing is entering a number, say 25, then pressing 'FT' to convert to feet. This is when the problem appears.
I believe the normal (default?) behaviour is that you would be here in the code at that point....

pic2.JPG

But when I do the same test on my phone, I end up here (which like you said is just after the AVIEW statement):
pic4.JPG
And yes, pressing R/S will make it continue.

Here are the settings from the PRINT menu on the phone exhibiting the problem:
pic1.JPG

When it's set to POFF, isn't that supposed to clear both flags 21 and55? I don't understand how flag 21 would be set.
I've tried changing those Print settings, but nothing seems to change the behaviour.

I could still reset the calculator, but that seems like brute force (and I won't learn anything)!

Thanks again for any feedback.

Terry
LENG.txt

Vincent Weber

unread,
Jun 21, 2025, 2:06:44 PMJun 21
to Free42 & Plus42
You need to clear flag 21 manually. It is not that much related to printing than to pausing or not when VIEW or AVIEW is executed. POFF wont' clear this flag for you. 

Vincent Weber

unread,
Jun 21, 2025, 2:12:21 PMJun 21
to Free42 & Plus42
Sorry, I mean yes PROFF will clear the flag, but you can still set it manually, so you probably did a SF 21 at some point, either directly or by program. 

Terry Haroldson

unread,
Jun 21, 2025, 2:38:36 PMJun 21
to Free42 & Plus42
I just toggled PRON/PROFF and now it's working as expected.... I thought I had done that before, but obviously didn't!

Really appreciate your prompt replies. Have a good day.

Terry Haroldson

unread,
Jun 21, 2025, 2:46:52 PMJun 21
to Free42 & Plus42
I'll ask one more question. Do you know of a way to check the current value of a flag?

Vincent Weber

unread,
Jun 21, 2025, 2:48:09 PMJun 21
to Free42 & Plus42
FS? In FLAGS menu
Message has been deleted

Terry Haroldson

unread,
Jun 21, 2025, 2:53:06 PMJun 21
to Free42 & Plus42

Oh, right.... right in Flags menu.  Got it.

On Saturday, June 21, 2025 at 11:51:05 AM UTC-7 Terry Haroldson wrote:
Ok, right! Could write a several line program to test any flag.
Thank you.
Reply all
Reply to author
Forward
0 new messages