Typing icon indicating copy to clipboard operation
Typing copied to clipboard

Default initial keyboard in runCJAlgorithm?

Open FrankDMartinez opened this issue 12 years ago • 2 comments

Hi, In runCJAlgorithm(), the k variable is uninitialized before being copied to prev the first time thru the for-loop. To prevent k from being filled with garbage data, should it be initialized to, say, nilKeyboard before the first loop?

FrankDMartinez avatar Jul 30 '12 16:07 FrankDMartinez

Whatever the answer to the above question is, would that answer also apply to bestk in the same function?

FrankDMartinez avatar Jul 30 '12 16:07 FrankDMartinez

nilKeyboard would be a sensible default value. It doesn't matter much, because prevk is not used on the first time through the loop.

On 7/30/12 11:44 AM, FrankDMartinez wrote:

Hi, In runCJAlgorithm(), the k variable is uninitialized before being copied to prev the first time thru the for-loop. To prevent k from being filled with garbage data, should it be initialized to, say, nilKeyboard before the first loop?


Reply to this email directly or view it on GitHub: https://github.com/MTGandP/Typing/issues/8

michaeldickens avatar Jul 30 '12 18:07 michaeldickens