log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Elsear brings super-fast Networking to Risc PC/A7000/A7000+ (News:)
- Latest hardware upgrade from RISCOSbits (News:)
- Accessing old floppy disks (Gen:3)
- November developer 'fireside' chat on saturday night (News:)
- RISCOSbits releases a new laptop solution (News:4)
- Announcing the TIB 2024 Advent Calendar (News:2)
- RISC OS London Show Report 2024 (News:1)
- Code GCC produces that makes you cry #12684 (Prog:39)
- Rougol November 2024 meeting on monday (News:)
- Drag'n'Drop 14i1 edition reviewed (News:)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
Acorn Arcade forums: Programming: Calling Perl from Basic
 
  Calling Perl from Basic
  richcheng (13:26 13/4/2005)
  monkeyson2 (14:19 13/4/2005)
    richcheng (08:09 14/4/2005)
 
richard cheng Message #64249, posted by richcheng at 13:26, 13/4/2005

Posts: 655
I have a Basic program that contains a line along the lines of:

10 OSCLI "perl <Markdown> <infile>"

where <markdown> is the path to a perl script, and <infile> is the path to a file processed by the Markdown script.

When run in a task window from the basic intepreter invoked by '*basic', the program gets as far as this line, which executes correctly, but the subsequent line is never executed, the program ceases, and I am presented with a star prompt - not Basic's > prompt.

Similarly, when the line is called from a WebJames Baisc cgi script, it kills execution of the script.

So my questions are twofold:
  1. Am I doing something blatently stupidly wrong, here?
  2. If not, is there a workaround, short of learning perl and rewriting my cgi-script in that language?
  ^[ Log in to reply ]
 
Phil Mellor Message #64252, posted by monkeyson2 at 14:19, 13/4/2005, in reply to message #64249
monkeyson2Please don't let them make me be a monkey butler

Posts: 12380
It's because you're executing a new program (rather than a module *command).

For what you want to do, I believe you have to use Wimp_StartTask, which can only be done as part of a Wimp application.

SYS "Wimp_Initialise", blah-i-can't-remember
SYS "Wimp_StartTask", "perl <Markdown> <infile>"
SYS "Wimp_Closedown", blah-i-can't-remember
  ^[ Log in to reply ]
 
richard cheng Message #64263, posted by richcheng at 08:09, 14/4/2005, in reply to message #64252

Posts: 655
Aha!

Cool. Muchos gracias.
  ^[ Log in to reply ]
 

Acorn Arcade forums: Programming: Calling Perl from Basic