/[pspp]/pspp/doc/language.texi
ViewVC logotype

Diff of /pspp/doc/language.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by blp, Tue May 3 13:11:12 2005 UTC revision 1.5 by blp, Wed May 4 15:36:56 2005 UTC
# Line 5  Line 5 
5    
6  @quotation  @quotation
7  @strong{Please note:} PSPP is not even close to completion.  @strong{Please note:} PSPP is not even close to completion.
8  Only a few actual statistical procedures are implemented.  PSPP  Only a few statistical procedures are implemented.  PSPP
9  is a work in progress.  is a work in progress.
10  @end quotation  @end quotation
11    
# Line 50  must be letters, digits, or one of the f Line 50  must be letters, digits, or one of the f
50  @end example  @end example
51    
52  @cindex case-sensitivity  @cindex case-sensitivity
53  Identifiers may be up any length, but only the first 64 bytes are  Identifiers may be any length, but only the first 64 bytes are
54  significant.  Identifiers are not case-sensitive: @code{foobar},  significant.  Identifiers are not case-sensitive: @code{foobar},
55  @code{Foobar}, @code{FooBar}, @code{FOOBAR}, and @code{FoObaR} are  @code{Foobar}, @code{FooBar}, @code{FOOBAR}, and @code{FoObaR} are
56  different representations of the same identifier.  different representations of the same identifier.
# Line 150  Most of these appear within the syntax o Line 150  Most of these appear within the syntax o
150  punctuator only as the last character on a line (except white space).  punctuator only as the last character on a line (except white space).
151  When it is the last non-space character on a line, a period is not  When it is the last non-space character on a line, a period is not
152  treated as part of another token, even if it would otherwise be part  treated as part of another token, even if it would otherwise be part
153  of e.g.@: an identifier or a floating-point number.  of, e.g.@:, an identifier or a floating-point number.
154    
155  Actually, the character that ends a command can be changed with  Actually, the character that ends a command can be changed with
156  @cmd{SET}'s ENDCMD subcommand (@pxref{SET}), but we do not recommend  @cmd{SET}'s ENDCMD subcommand (@pxref{SET}), but we do not recommend
# Line 174  or more characters, where these abbrevia Line 174  or more characters, where these abbrevia
174  The command name may be followed by one or more @dfn{subcommands}.  The command name may be followed by one or more @dfn{subcommands}.
175  Each subcommand begins with a subcommand name, which may be  Each subcommand begins with a subcommand name, which may be
176  abbreviated to its first three letters.  Some subcommands accept a  abbreviated to its first three letters.  Some subcommands accept a
177  series of one or more specifications, which follow the subcommand name  series of one or more specifications, which follow the subcommand
178  and, optionally separated from it by an equals sign (@samp{=}), and  name, optionally separated from it by an equals sign
179  optionally separated from each other by commas.  Each subcommand must  (@samp{=}). Specifications may be separated from each other
180  be separated from the next (if any) by a forward slash (@samp{/}).  by commas or spaces.  Each subcommand must be separated from the next (if any)
181    by a forward slash (@samp{/}).
182    
183  There are multiple ways to mark the end of a command.  The most common  There are multiple ways to mark the end of a command.  The most common
184  way is to end the last line of the command with a period (@samp{.}) as  way is to end the last line of the command with a period (@samp{.}) as
# Line 216  commands}. Line 217  commands}.
217  @item File definition commands  @item File definition commands
218  @cindex file definition commands  @cindex file definition commands
219  Give instructions for reading data from text files or from special  Give instructions for reading data from text files or from special
220  binary ``system files''.  Most of these commands discard any previous  binary ``system files''.  Most of these commands replace any previous
221  data or variables to replace it with the new data and  data or variables with new data or
222  variables.  At least one must appear before the first command in any of  variables.  At least one file definition command must appear before the first command in any of
223  the categories below.  @xref{Data Input and Output}.  the categories below.  @xref{Data Input and Output}.
224    
225  @item Input program commands  @item Input program commands
226  @cindex input program commands  @cindex input program commands
227  Though rarely used, these provide powerful tools for reading data files  Though rarely used, these provide tools for reading data files
228  in arbitrary textual or binary formats.  @xref{INPUT PROGRAM}.  in arbitrary textual or binary formats.  @xref{INPUT PROGRAM}.
229    
230  @item Transformations  @item Transformations
# Line 250  active file (the data) to be read. Line 251  active file (the data) to be read.
251  @cindex order of commands  @cindex order of commands
252    
253  PSPP does not place many restrictions on ordering of commands.  The  PSPP does not place many restrictions on ordering of commands.  The
254  main restriction is that variables must be defined they are otherwise  main restriction is that variables must be defined before they are otherwise
255  referenced.  This section describes the details of command ordering,  referenced.  This section describes the details of command ordering,
256  but most users will have no need to refer to them.  but most users will have no need to refer to them.
257    
# Line 259  FILE TYPE, transformation, and procedure Line 260  FILE TYPE, transformation, and procedure
260  distinction between the @cmd{INPUT PROGRAM} and @cmd{FILE TYPE}  distinction between the @cmd{INPUT PROGRAM} and @cmd{FILE TYPE}
261  @emph{commands} and the INPUT PROGRAM and FILE TYPE @emph{states}.)  @emph{commands} and the INPUT PROGRAM and FILE TYPE @emph{states}.)
262    
263  PSPP starts up in the initial state.  Each successful completion  PSPP starts in the initial state.  Each successful completion
264  of a command may cause a state transition.  Each type of command has its  of a command may cause a state transition.  Each type of command has its
265  own rules for state transitions:  own rules for state transitions:
266    
# Line 487  designed to write to binary files.  @xre Line 488  designed to write to binary files.  @xre
488  @cindex variables, system  @cindex variables, system
489    
490  There are seven system variables.  These are not like ordinary  There are seven system variables.  These are not like ordinary
491  variables, as they are not stored in each case.  They can only be used  variables because system variables are not always stored.  They can be used only
492  in expressions.  These system variables, whose values and output formats  in expressions.  These system variables, whose values and output formats
493  cannot be modified, are described below.  cannot be modified, are described below.
494    
# Line 565  desired number of decimal places, if app Line 566  desired number of decimal places, if app
566  included then it is assumed to be 0.  Some formats do not allow @var{d}  included then it is assumed to be 0.  Some formats do not allow @var{d}
567  to be specified.  to be specified.
568    
569  When an input format is specified on @cmd{DATA LIST} or another  When @cmd{DATA LIST} or another command specifies an input format,
570  command, then  that format is converted to an output format for the purposes of
571  it is converted to an output format for the purposes of @cmd{PRINT}  @cmd{PRINT} and other data output commands.  For most purposes, input
572  and other  and output formats are the same; the salient differences are described
573  data output commands.  For most purposes, input and output formats are  below.
 the same; the salient differences are described below.  
574    
575  Below are listed the input and output formats supported by PSPP.  If an  Below are listed the input and output formats supported by PSPP.  If an
576  input format is mapped to a different output format by default, then  input format is mapped to a different output format by default, then
# Line 654  with output @var{w} as 9 + input @var{d} Line 654  with output @var{w} as 9 + input @var{d}
654  @item PIB @result{} F: 1 <= iw,ow <= 8  @item PIB @result{} F: 1 <= iw,ow <= 8
655  Positive integer binary format.  The field is interpreted as a  Positive integer binary format.  The field is interpreted as a
656  fixed-point positive binary number.  The location of the decimal point  fixed-point positive binary number.  The location of the decimal point
657  is implied.  Endianness is teh same as the host machine.  is implied.  Endianness is the same as the host machine.
658    
659  The default output format follows the rules for IB format.  The default output format follows the rules for IB format.
660    
# Line 831  YYYY} otherwise. Line 831  YYYY} otherwise.
831    
832  @item DATETIMEw.d: 17 <= iw,ow <= 40  @item DATETIMEw.d: 17 <= iw,ow <= 40
833  Date and time format.  Input format: leader + day + date-delimiter +  Date and time format.  Input format: leader + day + date-delimiter +
834  month + date-delimiter + yaer + time-delimiter + hour24 + time-delimiter  month + date-delimiter + year + time-delimiter + hour24 + time-delimiter
835  + minute + opt-second.  Output format: @samp{DD-MMM-YYYY HH:MM}.  If  + minute + opt-second.  Output format: @samp{DD-MMM-YYYY HH:MM}.  If
836  @var{w} > 19 then seconds @samp{:SS} is added.  If @var{w} > 22 and  @var{w} > 19 then seconds @samp{:SS} is added.  If @var{w} > 22 and
837  @var{d} > 0 then fractional seconds @samp{.SS} are added.  @var{d} > 0 then fractional seconds @samp{.SS} are added.
# Line 890  use a @dfn{scratch variable}.  Scratch v Line 890  use a @dfn{scratch variable}.  Scratch v
890  names begin with an octothorpe (@samp{#}).    names begin with an octothorpe (@samp{#}).  
891    
892  Scratch variables have the same properties as variables left with  Scratch variables have the same properties as variables left with
893  @cmd{LEAVE}:  @cmd{LEAVE}: they retain their values between cases, and for the first
894  they retain their values between cases, and for the first case they are  case they are initialized to 0 or blanks.  They have the additional
895  initialized to 0 or blanks.  They have the additional property that they  property that they are deleted before the execution of any procedure.
896  are deleted before the execution of any procedure.  For this reason,  For this reason, scratch variables can't be used for analysis.  To use
897  scratch variables can't be used for analysis.  To obtain the same  a scratch variable in an analysis, use @cmd{COMPUTE} (@pxref{COMPUTE})
898  effect, use @cmd{COMPUTE} (@pxref{COMPUTE}) to copy the scratch variable's  to copy its value into an ordinary variable, then use that ordinary
899  value into an ordinary variable, then analysis that variable.  variable in the analysis.
900    
901  @node Files, BNF, Variables, Language  @node Files, BNF, Variables, Language
902  @section Files Used by PSPP  @section Files Used by PSPP
# Line 912  most important of these files: Line 912  most important of these files:
912  @cindex syntax file  @cindex syntax file
913  @item command file  @item command file
914  @itemx syntax file  @itemx syntax file
915  These names (synonyms) refer to the file that contains instructions to  These names (synonyms) refer to the file that contains instructions
916  PSPP that tell it what to do.  The syntax file's name is specified on  that tell PSPP what to do.  The syntax file's name is specified on
917  the PSPP command line.  Syntax files can also be pulled in with  the PSPP command line.  Syntax files can also be pulled in with
918  @cmd{INCLUDE} (@pxref{INCLUDE}).  @cmd{INCLUDE} (@pxref{INCLUDE}).
919    
# Line 959  following table describes BNF: Line 959  following table describes BNF:
959  @item  @item
960  Words in all-uppercase are PSPP keyword tokens.  In BNF, these are  Words in all-uppercase are PSPP keyword tokens.  In BNF, these are
961  often called @dfn{terminals}.  There are some special terminals, which  often called @dfn{terminals}.  There are some special terminals, which
962  are actually written in lowercase for clarity:  are written in lowercase for clarity:
963    
964  @table @asis  @table @asis
965  @cindex @code{number}  @cindex @code{number}

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26