Skip to content

Add INSPECT verb example (character counting/replacement)#65

Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1772139145-inspect-verb
Open

Add INSPECT verb example (character counting/replacement)#65
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1772139145-inspect-verb

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented Feb 26, 2026

Summary

Adds a new inspect/ directory with a COBOL example program demonstrating the INSPECT verb across 10 examples covering all three main forms:

  • TALLYING (EX 1–4): Count all characters, count specific characters, count leading characters, and use BEFORE/AFTER INITIAL clauses
  • REPLACING (EX 5–8): Replace all, leading, first occurrences, and scoped replacement with AFTER INITIAL
  • CONVERTING (EX 9–10): Character translation tables (lowercase→uppercase), with and without AFTER INITIAL scoping

Includes a README.md with syntax examples and full program output, following the same structure as existing examples (e.g., trim/, unstring/).

The program was compiled and executed successfully with GnuCOBOL 3.1.2. Output in the README was captured from actual program execution.

Review & Testing Checklist for Human

  • EX 1 tallies 30 (full PIC X(30) field length, including trailing spaces), not 11 (visible characters of "Hello World"). This is correct COBOL behavior but may confuse learners — consider whether a comment or README note should clarify this.
  • Compile and run inspect/inspect.cbl with cobc -x inspect.cbl && ./inspect to verify the README output matches.
  • Author in the file header is "Devin AI" — other repo examples use "Erik Eriksen". Adjust if preferred.

Notes


Open with Devin

Co-Authored-By: shayan <shayan@cognition.ai>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

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.

1 participant