Post Reply 
Sudoku editor/Solver
12-20-2016, 07:37 PM (This post was last modified: 12-20-2016 07:37 PM by lenborje.)
Post: #21
RE: Sudoku editor/Solver
Ooo... nice! Christmas comes early this year! :-D

/Lennart Börjeson
Stockholm, Sweden
Find all posts by this user
Quote this message in a reply
12-21-2016, 02:57 PM
Post: #22
RE: Sudoku editor/Solver
(12-20-2016 04:11 PM)Guenter Schink Wrote:  I see. The Sudoku_temp.txt is a version that has the proposed changes. I'll delete the file once you were able to do the corrections yourself. Not necessary to have various versions floating around.

Your version works in my HW Prime, but not in the latest Emulator. I believe there's been some changes in how lists are handled. I really wish it was easier to debug on the prime...

I shall have to compare runs on my HW Prime and the Emulator to pin down what's different.

/Lennart Börjeson
Stockholm, Sweden
Find all posts by this user
Quote this message in a reply
12-21-2016, 04:25 PM
Post: #23
RE: Sudoku editor/Solver
(12-21-2016 02:57 PM)lenborje Wrote:  Your version works in my HW Prime, but not in the latest Emulator. I believe there's been some changes in how lists are handled. I really wish it was easier to debug on the prime...

I shall have to compare runs on my HW Prime and the Emulator to pin down what's different.

Hmm! Are you sure your emulator is firmware 11226 date: 2016-12-08? The program I posted runs fine with this firmware. Actually I used the emulator to find the error.

Debugging of course is cumbersome at times.

Here is how I found the glitch
  1. load program into the emulator
  2. copy the source code to Notepad++
  3. push "check" in the emulator
  4. see "error in line xxx"
  5. look in Notepad++, what's going on at that line number
  6. analyse what may be wrong
  7. type "Union" into the Home screen and push "help"
  8. find it is a built in function
  9. do the necessary corrections
  10. start over with the next error "DoSolve"


I know that Notepad++ is not available for Mac. But all you need is an editor that handles the various text codes (e.g. UTF-8) automatically and provides line numbers. You'll find something suitable when searching the web with "Notepad++ Mac"

Hope this helps, Günter
Find all posts by this user
Quote this message in a reply
12-21-2016, 04:42 PM
Post: #24
RE: Sudoku editor/Solver
(12-21-2016 04:25 PM)Guenter Schink Wrote:  Hmm! Are you sure your emulator is firmware 11226 date: 2016-12-08? The program I posted runs fine with this firmware. Actually I used the emulator to find the error.

It is the very same version.

/Lennart Börjeson
Stockholm, Sweden
Find all posts by this user
Quote this message in a reply
12-21-2016, 05:02 PM
Post: #25
RE: Sudoku editor/Solver
(12-21-2016 04:42 PM)lenborje Wrote:  
(12-21-2016 04:25 PM)Guenter Schink Wrote:  Hmm! Are you sure your emulator is firmware 11226 date: 2016-12-08? The program I posted runs fine with this firmware. Actually I used the emulator to find the error.

It is the very same version.

That's strange. I just downloaded the Sudoku_temp.zip and pasted the text file into the emulator. No errors no problem! Same on three of my Android devices with various Android versions.

Perhaps you could try to uninstall the emulator, get another copy downloaded and install it again.

I don't have a real clue what could be wrong.

Günter
Find all posts by this user
Quote this message in a reply
12-22-2016, 08:57 AM
Post: #26
RE: Sudoku editor/Solver
I've upgraded my HW Prime, and the Sudoku program works very well on it.

But there's some really strange weirdness in my emulator. The built-in functions "head" and "tail" does not seem to work when the parameter is a local variable.

E.g.
Code:
RETURN head({17, 4711, 42});
returns 17, but

Code:
LOCAL elm={17, 4711, 42};
RETURN head(elm);

returns the variable itself, "elm".

Calling head on global variables works OK, e.g.
Code:
L0:={17,47111,42};
RETURN head(L0);

returns 17 as expected.


I'm going to report this on the emulator/CK thread.

/Lennart Börjeson
Stockholm, Sweden
Find all posts by this user
Quote this message in a reply
Post Reply 




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