Post Reply 
HP-41 Barcode Scanner and Generator
09-03-2023, 05:59 AM (This post was last modified: 09-03-2023 06:04 AM by gomi42.)
Post: #24
RE: HP-41 Barcode Scanner and Generator
Hi Paul,

well recognized! Your guess is correct the range refers to the FOCAL statement number (line number). Blank lines and comments do not count.

The code that counts the pure statements is quite trivial, I cannot identify a problem there. All the tests pass - even with extrem long programs.

My guess is that your program enforces the automatic addition of statements behind the scenes. Automatically added statements also count. There are two scenarios where statements are automatically added:

1: If you FOCAL program does not end with an END or .END. statement, the .END. is automatically appended --> you'll get one line more than expected.

2: You remember the problem with numbers in consecutive lines (link). A NULL statement needs to be inserted to separate the numbers. Each NULL statement also counts and increments the statement counter.

Do you see a chance to verify that in your program?

Michael
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP-41 Barcode Scanner and Generator - gomi42 - 09-03-2023 05:59 AM



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