RISC OS Open
Safeguarding the past, present and future of RISC OS for everyone
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Previous|Next

  • Tickets
  • » Ticket #333

Ticket #333 (Invalid)Thu Jan 17 21:09:11 UTC 2013

Redirection with curly brackets over-riding If Then

Reported by: Ronald May (387) Severity: Normal
Part: RISC OS: General Release:
Milestone: Status Invalid

Details by Ronald May (387):

When using { > file } from the CLI, in an Obey file or Alias, file is /always/ opened.

*Set var yes
*If “<var>” = “no” Then Echo no { > decision }
The only way to do this is to use Spool, but on my Iyonix 5.18 Spool outputs to the
vdu as well as to spool file. I haven’t found the *FX3 options yet, could relevant
ones be included with *help spool ?

Changelog:

Modified by Ronald May (387) Thu, January 17 2013 - 21:26:48 GMT

  • Part changed from Unspecified to RISC OS: General

Modified by Sprow (202) Thu, January 17 2013 - 21:42:08 GMT

  • Status changed from Open to Invalid

This is an operator precedence question. The answer is in the section on redirection in PRM 1-959.

“The redirection specifier can appear anywhere in a line. Note that there must be exactly
one space between each element, or it will not be recognised as one. After being
decoded. The redirection specifier is stripped before the rest of the command is
interpreted.”

So, the first step looks at the *IF line and finds redirection is requested and creates the output. Then it removes the {} bit and passes the remainder to the *IF evaluator.

The cunning people in the forums can probably come up with a solution, probably involving the *DO command.

  • Comment on, or change status of, this ticket

Previous|Next

Search tickets

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Options

  • Tickets
  • New ticket
  • Milestones
  • Subversion: Changesets
  • Subversion: Browse
  • CVS: Revisions
  • CVS: Browse
  • Search

RSS feeds Rss

  • Tickets
  • Everything!
  • More feeds...
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Collaboa theme is distantly based on the Collaboa default layout

Valid XHTML 1.0  |  Valid CSS

Powered by Collaboa
This site runs on Rails

Hosted by Arachsys