On Thu, Feb 27, 2014 at 8:34 AM, Maurice <maurice@bcs.org.uk> wrote:
Just come across weirdly inconsistent results when passing "?" as an
argument. What have I overlooked, I wonder...

In most shells, including Windows, the ? is a file wildcard character.  You shouldn't try to pass it as an argument to a program.

Given the test program called 'odd':

  #!  /usr/bin/rexx
  parse arg given .
  say "/"given"/"

then using  ooRexx-4.1.1.opensuse1140.i586.rpm on Linux Mageia-3, I
get the following inconsistencies between laptop and desktop machines
using the same version of ooRexx and Mageia-3:


  $rexx ~/rx/odd ?
  $ rexx ~/rx/odd ??
  ]$ rexx ~/rx/odd ???


  $ rexx ~/rx/odd ?
  /A/                <-----------------Note!
  $ rexx ~/rx/odd ??
  $ rexx ~/rx/odd ???

  (1) With one "?", why do laptop and desktop yield different results?

You have different files in the rx directory on the different machines I would think.  On one you have a file A and on the other you have no single letter files.
  (2) Why the unexpected results with strings of multiple "?"s?

I'm not sure that they are unexpected. rx matches ?? It is a 2 character file / directory name.
??? matches bin, it is a 3 character file / directory name.

Mark Miesfeld