Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #709

Re: Parsing command-line arguments for module commands

From Martin Bazley <martin.bazley@blueyonder.co.uk>
Newsgroups comp.sys.acorn.programmer
Subject Re: Parsing command-line arguments for module commands
Message-ID <91d5c21052.martin@blueyonder.co.uk> (permalink)
References <e3d7d3e1-79aa-4e91-8b6b-6a1d0b273aca@s12g2000yqm.googlegroups.com>
Organization virginmedia.com
Date 2011-09-11 00:13 +0100

Show all headers | View raw


The following bytes were arranged on 10 Sep 2011 by Terje Slettebø :

> I may be overlooking something obvious, but when implementing a
> module, the command entry point receives the command tail, and the
> number of arguments there is, but the arguments are not separated in
> any way.
>
> Is there a way using RISC OS to split the tail up, to get e.g. an
> array of arguments, in a way that takes into account quoted strings
> (like RISC OS apparently does when it counts the arguments)?

SWI "OS_ReadArgs".

Good luck wrangling with the explanation of the syntax string format,
though; it took me hours of experimentation to determine exactly what
each letter code did, and what they did when combined.  Let me know if
you need help and I'll see if I can dig out my old notes.

-- 
  __<^>__   "Your pet, our passion." - Purina
 / _   _ \  "Your potential, our passion." - Microsoft, a few months later
( ( |_| ) )
 \_>   <_/  ======================= Martin Bazley ==========================

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Parsing command-line arguments for module commands Terje Slettebø <tslettebo@gmail.com> - 2011-09-10 15:11 -0700
  Re: Parsing command-line arguments for module commands Martin Bazley <martin.bazley@blueyonder.co.uk> - 2011-09-11 00:13 +0100
    Re: Parsing command-line arguments for module commands Terje Slettebø <tslettebo@gmail.com> - 2011-09-11 01:31 -0700
      Re: Parsing command-line arguments for module commands Martin Bazley <martin.bazley@blueyonder.co.uk> - 2011-09-11 14:32 +0100
        Re: Parsing command-line arguments for module commands Terje Slettebø <tslettebo@gmail.com> - 2011-09-12 03:17 -0700

csiph-web