Subject: Re: Command line

From: Jan Wielemaker <[email-masked]>
Date: Wed, 29 Sep 1999 10:04:21 +0200

On Tue, 28 Sep 1999, Cortelli Paolo wrote:
>Hi!
>I'm using SWI-Prolog for Windows and have made an exe which should receive
>parameters through the command line: is there a way to do so?

You can fetch the commandline arguments using

	...
	unix(argv(Argv)),
	...

or, at low-level using '$argv'(Argv).  Sometime, this will change to get
a more meaningful name, preferably in line with some (defacto) standard.

>Another question: I need to read in binary from a file and am using get0/1;
>isn't there a way to read in a buffer, say, 200 bytes at a time?

No.  Of course, this isn't very hard to write.  If speed is crucial and
lots of low-level I/O is required, it is often a good idea to consider
writing the low-level stuff in C.

	Regards --- Jan