Skip to content
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 #136

Merged
merged 2 commits into from
Apr 22, 2024
Merged

Conversation

kapitaali
Copy link
Contributor

Hi,

please find my exercise to the COBOL track: binary-search

no GOBACKs were used, instead EXIT PROGRAM was used (hopefully cobolcheck does not warn)

@kapitaali
Copy link
Contributor Author

It appears the .cut file was an old version, fixed on my branch.

@axtens
Copy link
Member

axtens commented Apr 20, 2024

Regarding

01 Teibel. 
         02 Taulukko               PIC 999 OCCURS 1 TO 20
                                   DEPENDING ON IDX.        

I wonder how you'd go with an INDEXED BY and then you can SET index-name TO value and then SET index-name UP BY 1 or SET index-name DOWN BY 1

@kapitaali
Copy link
Contributor Author

kapitaali commented Apr 21, 2024

I haven't had the need to do any INDEX operations like SEARCH. But subscripts could be changed to INDEXes if needed. The downside is that if any arithmetic is used to compute index values, only subscripts can be computed.

@axtens
Copy link
Member

axtens commented Apr 21, 2024 via email

@axtens axtens self-requested a review April 22, 2024 03:50
@axtens axtens merged commit d098126 into exercism:main Apr 22, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants