examples #17

Merged
navicore merged 1 commit from phase12c into main 2026-02-11 22:43:41 +00:00
navicore commented 2026-02-11 20:47:14 +00:00 (Migrated from github.com)
No description provided.
claude[bot] commented 2026-02-11 20:50:07 +00:00 (Migrated from github.com)

PR Review: Example Files

I reviewed all 15 example REXX files in this PR for correctness, REXX semantics compliance, and potential runtime issues.

Summary

Overall: Examples are well-written and demonstrate key REXX features correctly

All examples are syntactically valid and follow proper REXX semantics. The code demonstrates:

  • Arbitrary-precision arithmetic with NUMERIC DIGITS
  • Proper stem variable usage (simple, string-keyed, multi-dimensional)
  • Correct PARSE patterns (word splitting, literal, positional, dot placeholder)
  • Appropriate PROCEDURE isolation and recursion
  • String manipulation, queue operations, and control flow

Observations

1. signal_traps.rexx:10 - Division by zero error handling

SIGNAL ON SYNTAX NAME catch_syntax
x = 1 / 0

Observation: According to ANSI X3.274-1996, division by zero should raise Error 42 (Arithmetic overflow/underflow). However, many REXX implementations do trigger SYNTAX conditions for arithmetic errors, so this may be implementation-dependent. The example demonstrates the mechanism correctly, but readers should be aware that the specific error condition triggered by division by zero varies across implementations.

2. parse_demo.rexx:44-45 - Whitespace handling

expr = 3 + 4
PARSE VALUE 'Result:' expr WITH label ':' val

The concatenation 'Result:' expr produces 'Result: 7' (with a space before 7 due to REXX's blank concatenation operator). The parse correctly extracts label='Result' and val=' 7'. Line 47 strips the value, so this is handled properly. Just noting that the implicit blank is intentional REXX behavior.

3. Comprehensive coverage

The examples provide excellent coverage of:

  • Core language features (fizzbuzz.rexx, hello.rexx)
  • Advanced features (INTERPRET, SIGNAL, PARSE, ADDRESS)
  • Built-in functions (strings.rexx, conversions.rexx, words.rexx)
  • Data structures (stem_arrays.rexx, queues.rexx)
  • Arithmetic precision (arithmetic.rexx, factorial.rexx, fibonacci.rexx)

Recommendation

Approve - These examples are excellent educational resources and demonstrate proper REXX programming patterns. They will be valuable for users learning the interpreter.

No blocking issues found.

## PR Review: Example Files I reviewed all 15 example REXX files in this PR for correctness, REXX semantics compliance, and potential runtime issues. ### Summary ✅ **Overall: Examples are well-written and demonstrate key REXX features correctly** All examples are syntactically valid and follow proper REXX semantics. The code demonstrates: - Arbitrary-precision arithmetic with NUMERIC DIGITS - Proper stem variable usage (simple, string-keyed, multi-dimensional) - Correct PARSE patterns (word splitting, literal, positional, dot placeholder) - Appropriate PROCEDURE isolation and recursion - String manipulation, queue operations, and control flow ### Observations #### 1. **signal_traps.rexx:10** - Division by zero error handling ```rexx SIGNAL ON SYNTAX NAME catch_syntax x = 1 / 0 ``` **Observation:** According to ANSI X3.274-1996, division by zero should raise Error 42 (Arithmetic overflow/underflow). However, many REXX implementations do trigger SYNTAX conditions for arithmetic errors, so this may be implementation-dependent. The example demonstrates the mechanism correctly, but readers should be aware that the specific error condition triggered by division by zero varies across implementations. #### 2. **parse_demo.rexx:44-45** - Whitespace handling ```rexx expr = 3 + 4 PARSE VALUE 'Result:' expr WITH label ':' val ``` The concatenation `'Result:' expr` produces `'Result: 7'` (with a space before 7 due to REXX's blank concatenation operator). The parse correctly extracts `label='Result'` and `val=' 7'`. Line 47 strips the value, so this is handled properly. Just noting that the implicit blank is intentional REXX behavior. #### 3. **Comprehensive coverage** The examples provide excellent coverage of: - Core language features (fizzbuzz.rexx, hello.rexx) - Advanced features (INTERPRET, SIGNAL, PARSE, ADDRESS) - Built-in functions (strings.rexx, conversions.rexx, words.rexx) - Data structures (stem_arrays.rexx, queues.rexx) - Arithmetic precision (arithmetic.rexx, factorial.rexx, fibonacci.rexx) ### Recommendation **✅ Approve** - These examples are excellent educational resources and demonstrate proper REXX programming patterns. They will be valuable for users learning the interpreter. No blocking issues found.
Sign in to join this conversation.
No description provided.