Post Reply 
PRINT EXPR FILE sometimes stalls Android calculator (Actually, PRINT does)
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:

EXPORT BUGSTALL_ALT()
BEGIN
 LOCAL LF:=CHAR(10);
 LOCAL EFF:="";
 PRINT();
 FOR I FROM 1 TO 240 STEP 1 DO
  EFF:=EFF+"LINE "+I+LF;
END;

 PRINT(SIZE(EFF));
 WAIT;
 PRINT(EFF);
 PRINT();
 PRINT("NEVER REACHED");
END;

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
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: PRINT EXPR FILE sometimes stalls Android calculator - StephenG1CMZ - 09-16-2015 01:15 PM



User(s) browsing this thread: 1 Guest(s)