|
Posted by Dave (from the UK) on 05/21/06 05:39
I'm trying to writer a form
http://www.althorne.org/test.php
which
1) Reads a command for a maths program. An example command will be:
e.g. FactorInteger[141]
2) Adds a 'wrapper' command around this, which constrains the memory
usage and causes the command to abort if it uses too much RAM. So the
line above gets modified to look like this.
MemoryConstrained[ FactorInteger[141],100000000,"Too Much RAM Aborting"]
3) Passes the lot to the maths program.
4) Displays the results from the maths program.
For the purpose of demo, 'cat' can be to replace the maths program.
The problem is, the quotes around "Too Much RAM Aborting" are not being
passed to the maths program (or cat). Instead they are seen as 4
separate words. So instead of:
MemoryConstrained[ FactorInteger[141],100000000,"Too Much RAM Aborting"]
the programs see:
MemoryConstrained[ FactorInteger[141],100000000,Too Much RAM Aborting]
Anyone care to see how I might modify this? Here is the php code, which
I've used a .txt extension to stop the server considering it php.
http://www.althorne.org/test.txt
--
Dave K MCSE.
MCSE = Minefield Consultant and Solitaire Expert.
Please note my email address changes periodically to avoid spam.
It is always of the form: month-year@domain. Hitting reply will work
for a couple of months only. Later set it manually.
Navigation:
[Reply to this message]
|