]> www.ginac.de Git - ginac.git/blobdiff - cint/ginaccint.1
- Included manpage in dist.
[ginac.git] / cint / ginaccint.1
index aef0b0a66c9b757b35822a6ecf763994dec423ad..99546e457a3331f338adaa15390efe370742c4c1 100644 (file)
@@ -3,6 +3,7 @@
 GiNaC-cint \- An interactive interface for GiNaC based on the Cint C/C++ interpreter
 .SH SYNPOSIS
 .B ginaccint
+[file ...]
 .SH DESCRIPTION
 .B ginaccint
 is an interactive frontend for the GiNaC symbolic computation
@@ -14,13 +15,17 @@ scripts and later compiled with the native compiler and linked into
 the system.
 .SH USAGE
 .SS INPUT FORMAT
-After startup, ginsh displays a prompt signifying that it is ready to
+After startup, GiNaC-cint reads and executes the files given as 
+command line arguments. If any of these files contains a
+.BR .quit
+command, GiNaC-cint exits at this point.
+Otherwise it displays a prompt signifying that it is ready to
 accept your input. All C++ statements are valid as input, extended by
 GiNaC's numeric or symbolic expressions.  E.g.
 .BR fibonacci(24)/1104;
 returns a GiNaC object of class
-.BR ex,
-which in this case represents the numeric 42.  Symbols are declared by 
+.BR "ex" ,
+which in this case represents the numeric 42.  Symbols are declared by 
 statements as
 .nf 
 GiNaC> symbol x("x"), y("y"), z;
@@ -39,11 +44,37 @@ matches the first opening brace
 .RB ( { ) 
 or a semicolon
 .RB ( ; )
-is encountered.
+is encountered while there are no open braces. This implies that
+an input like 
+.nf
+GiNaC> class A {
+     > }
+     > ;
+.fi
+is misinterpreted to be complete after the closing brace.
+Instead you have to write
+.nf
+GiNaC> class A {
+     > };
+.fi
 
 .SS SPECIAL COMMANDS
+
+Lines starting with a dot mark special GiNaC-cint commands. Instead of
+.BR "\fB.cmd\fB"
+you can also write
+.BR "\fB//GiNaC-cint.cmd\fB"
+to be compatible with programs that will be compiled later.
+This is mostly useful for the
+.BR "\fB.function\fB" 
+declaration.
+
+Lines starting with #! (for #!/path/ginaccint) are ignored.
+
+
 .IP "\fB.cint\fR"
 Switch to cint's interactive mode.
+
 .IP "\fB.function\fR"
 
 Allow a function definition in interactive mode.  GiNaC-cint must be
@@ -51,14 +82,50 @@ put into a special mode in order to define a function. After that any
 function definition in valid C++ syntax may be typed in.  It becomes
 immediatly available for usage.
 
-.IP "\fBquit;\fR"
+.IP "\fB.help\fB"
+
+List a short summary of available commands.
+
+.IP "\fB.quit\fR"
 Exit from GiNaC-cint.  Same as 
-.BR "exit;" ,
-.BR "bye;" ,
+.BR ".bye" ,
+.BR ".exit" ,
 .BR ".q" ,
-.BR ".quit" ,
-.BR ".exit " or
-.BR ".bye" .
+.BR "bye;" ,
+.BR "exit; " or
+.BR "quit;" .
+
+.IP "\fB.read filename\fB"
+
+Read a file from disk and execute it in GiNaC-cint
+(recursive call is possible).
+
+.IP "\fB.redirect [filename]\fB"
+
+Redirect
+.BR "\fBOut\fP\fInum\fP" 
+output to a file (
+.BR .redirect
+alone redirects output to console).
+
+.IP "\fB.restart\fB"
+
+Restart GiNaC-cint (does not re-read command line files).      
+
+.IP "\fB.save filename\fB"
+
+Save the commands you have entered so far in a file.
+
+.IP "\fB.silent\fB"
+
+suppress
+.BR "\fBOut\fP\fInum\fP" 
+output (variables are still accessible).
+
+.IP "\fB.> [filename]\fB"
+
+same as
+.BR "\fB.redirect [filename]\fB" .
 
 .IP "\fBOut\fP\fInum\fP"
 Returns the expression whose output was marked
@@ -112,7 +179,7 @@ The GCD of -3+2*x*z*y+x^2*z^2*y^2 and 3-4*x*z*y+x^2*z^2*y^2
  is -1+x*z*y
  so (-3+2*x*z*y+x^2*z^2*y^2)*(3-4*x*z*y+x^2*z^2*y^2)^(-1)
  is (-3+x*z*y)^(-1)*(3+x*z*y)
-GiNaC> quit;
+GiNaC> .quit
 .fi
 
 .SH BUGS
@@ -137,7 +204,8 @@ after declaring them.  This accounts for some funny behaviour, like
 doesn't print, but
 .BR fibonacci(7)*1
 does, since this is not a naked number but an expression holding
-that number.
+that number. A warning message is printed in this case only for
+the first occurence.
 
 .SH AUTHOR
 .TP