PRINT EXPR FILE sometimes stalls Android calculator (Actually, PRINT does)
|
09-09-2015, 10:27 PM
(This post was last modified: 09-16-2015 03:19 PM by StephenG1CMZ.)
Post: #1
|
|||
|
|||
PRINT EXPR FILE sometimes stalls Android calculator (Actually, PRINT does)
Doing PRINT(EXPR(FILE)) stalls the Android calculator on some files.
I believe a setting may have changed as it used to work. Warning: the Android calculator requires a virtual Menu/Exit - on and ESC are ineffective. The effect on a real calculator is unknown. Code:
When using similar code within Z EDITOR, it used to work, but now doesn't. I have tried virtual Menu/Calculator/Reset, losing all my files, but the problem remains. Is a better Reset available? Is anyone else seeing this stall? [Note: testing Z Editor on itself was done using a different filename - not recursively] Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
09-16-2015, 10:10 AM
Post: #2
|
|||
|
|||
RE: PRINT EXPR FILE sometimes stalls Android calculator
Actually, on checking the above test code, there should be a PRINT(); statement to clear the Terminal before printing NEVER REACHED, without which the NEVER REACHED Will never be seen because Terminal doesn't scroll to show last line.
Inserting that has no effect on the bug. Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
09-16-2015, 01:15 PM
(This post was last modified: 09-16-2015 01:42 PM by StephenG1CMZ.)
Post: #3
|
|||
|
|||
RE: PRINT EXPR FILE sometimes stalls Android calculator
I now suspect that the cause is not a configuration issue, nor is it dependent on EXPR trying to parse specific content in specific files.
I now think that PRINT fails when given more than 2 KB to print. This test reproduces the same stall without requiring EXPR or file access: Warning: requires a virtual calculator exit. Effect on real calculator unknown. Code:
at 239 lines, the size of the string is just less than 2 KB. Increasing to 240 lines, NEVER REACHED is never reached. The program files that were revealing the bug were 214 lines, but those lines were longer than in this test program. Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
09-16-2015, 01:41 PM
Post: #4
|
|||
|
|||
RE: PRINT EXPR FILE sometimes stalls Android calculator
It's the size of the individual PRINT that counts, not the total amount printed to Terminal.
Dividing the PRINT into two small PRINTs avoids the stall. Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)