Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: $CommandLine

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43891] Re: [mg43864] $CommandLine
  • From: "P.J. Hinton" <paulh at wolfram.com>
  • Date: Fri, 10 Oct 2003 03:06:01 -0400 (EDT)
  • Organization: "Wolfram Research, Inc."
  • Sender: owner-wri-mathgroup at wolfram.com

On Thu, 9 Oct 2003, Peter Dickof wrote:

> According to the help file, "$CommandLine is a list of strings giving
> the elements of the original operating system command line with which
> Mathematica was invoked. "
> 
> I have been unable to find the following:
> 1) What exactly do the individual strings mean?
> 2) What are the "elements" allowed for an operating system command?
> 3) How is it possible to use $CommandLine to pass in arbitrary
> strings?
> 
> Can anyone point me to this information?

The value of $CommandLine is meant to be a read-only setting.  It
analogous to the argv[] argument of the main() function in a C program.  
For example, here is the value of $CommandLine for a kernel which was
launched on a Windows system.

In[1]:=
$CommandLine

Out[1]=
{C:\Program Files\Wolfram\
 
   Research\Mathematica\5.0\MathKernel.exe, -mathlink, 
 
  -mathlink, -linkmode, connect, -linkname, hcg_shm}

Usually the parameters passed on the command line will not be of any 
meaning to an end user, but it may prove useful in diagnosing technical 
problems with getting a kernel connected to another program.
-- 
P.J. Hinton
User Interface Programmer                         paulh at wolfram.com
Wolfram Research, Inc.


  • Prev by Date: RE: Perform an assigment
  • Next by Date: RE: piecewise definition of a function
  • Previous by thread: $CommandLine
  • Next by thread: Re: $CommandLine