|
Posted by Rich on 05/22/06 19:14
On Sun, 21 May 2006 03:39:25 +0100, from the UK wrote...
>
>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
>
>
The double-quotes are special characters that can be used to form a string of
text. If you need to include the double quotes as part of it, maybe try using
the backslash "\", such as...
MemoryConstrained[ FactorInteger[141],100000000,"\"Too Much RAM Aborting\""]
Rich
--
Newsguys Unlimited $19.95 / month
http://newsguy.com/overview.htm
Navigation:
[Reply to this message]
|