-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1 new exercise: binary-search #124
Conversation
Hello. Thanks for opening a PR on Exercism 🙂 We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in. You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch. If you're interested in learning more about this auto-responder, please read this blog post. Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it. |
Fixed config.json on my branch, I wonder if I can make this run again without starting all over? |
Before we go any further i must ask to address the following issue: cobol arrays start with item #1, that is, cobol arrays are 1-based. Your .CUT file however shows that you are assuming that the first item is #0 the way it is for 0-based C-family programming languages. Please change code and CUT to reflect a 1-based array layout. |
I don't see any reference to zero index. Can you point out the line number in the file? |
I don't see any reference to zero index. Can you point out the line number in the file? doing ctrl-f for (0) brings up zero results. |
L17-23 defines a 7-element array. Then you search for 6 (value of WS-ITEM). WS-RESULT is defined as 3, but in a 1-based array system, WS-RESULT should be 4. The 7-element array should be indexed from 1 to 7 but a WS-RESULT of 3 would only be returned if the 7-element array was indexed 0 to 6. |
Yes, those answers were directly from the .json file. If it is needed to have the results be in COBOL indexing, then I would need to change the code. Going to drop this for now if it's not acceptable. |
Do not drop. Change the CUT file. I expect that the Euphoria version of
this exercise had to change the test because it also is 1-based .
…On Tue, 16 Apr 2024, 11:01 pm Teppo Saari, ***@***.***> wrote:
Yes, those answers were directly from the .json file. If it is needed to
have the results be in COBOL indexing, then I would need to change the
code. Going to drop this for now if it's not acceptable.
—
Reply to this email directly, view it on GitHub
<#124 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABTFVNMZRH7V3LGPXEGWUDY5U4MTAVCNFSM6AAAAABGH7FCRKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJZGMYDQNBUHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
The problem specifications are written in JavaScript Object Notation and JavaScript is a 0-based language. Tests need to be rewritten for 1-based languages. |
Doing separate pull requests for new exercises. The first one is binary-search.