[fpc-pascal] Re: random numbers negative

2011-08-17 Thread Lukasz Sokol
On 16/08/2011 16:25, Luis Fernando Del Aguila Mejía wrote: I have a doubt. With the random function, Can you generate random numbers negative? Begin randomize; Writeln (random (-127)) / / 0 = n -127 End. thanks. As only negative range : somebody (Felipe) wrote that: ( -1*Random(127)

[fpc-pascal] Redirecting heap trace output to stdout

2011-08-17 Thread leledumbo
The only available function for dumping heap trace output is DumpHeap, which outputs to stderr. However, it's problematic to use it in a web environment, because web servers tend to give internal server error whenever stderr is not empty. Therefore, I'd like to redirect it to stderr, but I have no

Re: [fpc-pascal] Redirecting heap trace output to stdout

2011-08-17 Thread Bart
If it's on Linux, you can redirect stderr to stdout on the commandline... Don'tknow the exact syntax though. Bart On 8/17/11, leledumbo leledumbo_c...@yahoo.co.id wrote: The only available function for dumping heap trace output is DumpHeap, which outputs to stderr. However, it's problematic

[fpc-pascal] Re: Redirecting heap trace output to stdout

2011-08-17 Thread leledumbo
If it's on Linux, you can redirect stderr to stdout on the commandline... Err... it's the web server that calls my app, I didn't call it directly -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Redirecting-heap-trace-output-to-stdout-tp4708982p4709036.html

Re: [fpc-pascal] Redirecting heap trace output to stdout

2011-08-17 Thread Jonas Maebe
On 17 Aug 2011, at 18:37, leledumbo wrote: Therefore, I'd like to redirect it to stderr, but I have no idea how... assign(stderr,'somefile'); rewrite(stderr); Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Redirecting heap trace output to stdout

2011-08-17 Thread Graeme Geldenhuys
On 17 August 2011 19:13, Jonas Maebe wrote: assign(stderr,'somefile'); rewrite(stderr); I think you might be able to use the heaptrc environment variable for that as well. Not 100% sure if it will work in the case of a web app, but I can't see why not. See the heaptrc unit documentation for

Re: [fpc-pascal] Redirecting heap trace output to stdout

2011-08-17 Thread Michael Van Canneyt
On Thu, 18 Aug 2011, Graeme Geldenhuys wrote: On 17 August 2011 19:13, Jonas Maebe wrote: assign(stderr,'somefile'); rewrite(stderr); I think you might be able to use the heaptrc environment variable for that as well. Not 100% sure if it will work in the case of a web app, but I can't see

Re: [fpc-pascal] Redirecting heap trace output to stdout

2011-08-17 Thread Graeme Geldenhuys
On 18 August 2011 00:17, Michael Van Canneyt wrote: When using CGI, you don't control the environment. The webserver does. If you are in control of the webserver (like when you are developing apps), can't you add new environment variables to Apache's configs files etc.. I vaguely remember

[fpc-pascal] Re: Redirecting heap trace output to stdout

2011-08-17 Thread leledumbo
assign(stderr,'somefile'); rewrite(stderr); Thanks, nicely done. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Redirecting-heap-trace-output-to-stdout-tp4708982p4710217.html Sent from the Free Pascal - General mailing list archive at Nabble.com.