Home
        GAUSS for Windows User Guide
         Contents
1.          TO   244 2  834 3  602 3  333 4  822 5    14 5    Using GAUSS for Windows95    The difference between specifying N or N 1 delimiters can be seen here   456 4  345 2  533 22     624 3  639 5   602 3  333  4   If the invar statement had specified 3 variables and N 1 delimiters  this file would    be interpreted as having three rows containing a missing in the 2 1 element and the 3 3  element like this     456 4 345 2 533 2  624 3 639 5  602 3 333 4    If N delimiters had been specified  this file would be interpreted as having two rows   and a final incomplete row that is dropped     456 4 345 2 533 2  624 3 639 5    The spaces were shown only for clarity and are not significant in delimited files  so  BILL  222 3 123 2 456 4  345 2 533 2    STEVE  624 3 340 3  624 3 639 5    TOM  244 2 834 3 602 3 333 4  822 5    would work just as well                             Linefeeds are significant only if  n is specified as the delimiter  or when using  r   This example     invar delimit  r    name   var 5      will expect a file with no comma after the final element in each row                 BILD  22203  LL 456 4  345 2  533 2       STEVE  624 3  340 3  245 3  624 3  639 5             TO   244 2  834 3  60263  33364    822 55    14 6    Utilities    Packed ASCII Files Packed ASCII files must have fixed length records  The  record subcommand is used to specify the record length  and variables are specified  by giving their type  starting position  length  and the position o
2.      Extended Data Set v89  Obsolete     Data sets with more than 8175 columns are saved in an extended format  These files  have a   dht descriptor file formatted as follows     Offset Description       0 1 EEDA hex  identification flag   2 3 data type in  dat file  2 4 8   unsigned 2 byte integer  4 7 reserved  all 0   s   8 11 columns  unsigned 4 byte integer    12 15 row size in bytes  unsigned 4 byte integer  16 19 header size in bytes  unsigned 4 byte integer  20 23 reserved  all 0   s   24 27 reserved  all 0   s   28 29 control flags  unsigned 2 byte integer  30 127 reserved  all 0   s    Aside from the differences in the descriptor file and the number of columns allowed in  the data file  extended data sets conform to the v89 data set description specified  above     Matrix v92  Obsolete     Offset Description       0 3 always 0  4 7 always OXEECDCDCD  8 11 reserved    9 16    File I O       Offset Description  12 15 reserved  16 19 reserved  20 23 0   real matrix  1   complex matrix  24 27 number of dimensions  0   scalar  1  row vector  2   column vector  matrix  28 31 header size  128   dimensions   4  padded to 8 byte boundary  32 127 reserved    If the data is a scalar  the data will directly follow the header     If the data is a row vector  an unsigned integer equaling the number of columns in the  vector will precede the data  along with 4 padding bytes     If the data is a column vector or a matrix  there will be two unsigned integers  preceding the data  The
3.      _psym Mx7 matrix  M extra symbols will be plotted    M 1  x location    M 2  y location    M  3  symbol type   See _pstype  earlier       M  4  symbol height  If this is 0  a default height of 5 0 will be  used      M  5  symbol color  see    Colors     page 10 12    M  6  type of coordinates    1 plot coordinates   2 inch coordinates     M  7  line thickness  A value of zero is normal line width   _psym3d Mx7 matrix for plotting extra symbols on a 3 D  surface or xyz    graph     m  1  x location in plot coordinates     M 2  y location in plot coordinates     M  3  z location in plot coordinates      M  4  symbol type   See _pstype  earlier     M  5  symbol height  If this is 0  a default height of 5 0 will be  used      M  6  symbol color  see    Colors     page 10 12    M  7  line thickness  A value of 0 is normal line width   Use _psym for plotting extra symbols in inch coordinates     _psymsiz scalar or Kx1 vector  symbol size for the symbols on the main curves   This is NOT related to _psym  If 0  a default size of 5 0 is used     _ptek string  name of Tektronix format graphics file  This must have a    tkf extension  If this is set to a null string  the graphics file will be  suppressed  The default is graphic tkf     _pticout scalar  If 1  tick marks point outward on graphs  Default is 0     13 26    _ptitlht    _pversno    _pxpmax    _pxsci    _pypmax    _pysci    _pzclr    _pzoom    _pzpmax    _pzsci    Publication Quality Graphics    scalar  the height of the 
4.     If this value is scalar  it will be expanded to a vector     0 no axes numbers displayed   1 axes numbers displayed  vertically oriented on Y axis   2 axes numbers displayed  horizontally oriented on Y axis     For example   _pnum     0  2      no X axis numbers         horizontal on Y axis     scalar  size of axes numbers in inches  If 0  default   a size of 0 13  inch will be used     scalar  If 0  no rotation  if 1  plot will be rotated 90 degrees  Default is  0     scalar  If 1  display graph in window  if 0  do not display graph in  window  Default is 1    scalar  If 0  a beep will sound when the graph is finished drawing to  the window  Default is 1  no beep     scalar or Kx1 vector  controls symbol used at graph points  To use a  single symbol type for all points  set this to one of the following  scalar values     1 circle 8 solid circle   2 square 9 solid square   3 triangle 10 solid triangle   4 plus 11 solid plus   5 diamond 12 solid diamond   6 inverted triangle 13 solid inverted triangle  7 star  x  14 solid star  x     13 25    Using GAUSS for Windows95    If this is a vector  each line will have a different symbol  Symbols will  repeat if there are more lines than symbol types     _psurf 2x1 vector  controls 3 D surface characteristics    1  if 1  show hidden lines  Default is 0    2  color for base  default 7   see    Colors     page 10 12  The    base is an outline of the X Y plane with a line connecting  each corner to the surface  If 0  no base is drawn
5.     y   x rv cv      y rv cv    x     rv and ev can be any expressions returning vectors or matrices  The elements of rv  will be used as the row indices and the elements of cv will be used as the column  indices  If rv is a scalar 0  all rows will be used  if ev is a scalar 0  all columns will be  used  If a vector is used in an index expression  it is illegal to use the space operator or  the colon operator on the same side of the comma as the vector     Arrays of Matrices and Strings    It is possible to index sets of matrices or strings using the varget function     In this example  a set of matrix names is assigned to mvec  The name y is indexed  from mvec and passed to varget  which will return the global matrix y  The  returned matrix is inverted and assigned to g     mvec     Xy Za     i   2   g   inv varget  mvec i        The following procedure can be used to index the matrices in mvec more directly   proc imvec i    retp  varget  mvec i      endp     Then imvec  i  will equal the matrix whose name is in the ith element of mvec     4 31    Using GAUSS for Windows95    In the example above  the procedure imvec was written so that it always operates on  the vector mvec  The following procedure makes it possible to pass in the vector of  names being used     proc get array i    retp  varget  array i      endp   Then get  mvec  3  will return the 3rd matrix listed in mvec   proc put  x array  1    retp  varput  x array i      endp     And put  x  mvec  3  will assign x 
6.    Debug Window    You use the GAUSS Debugger to watch the program code as it runs  Prior to running  the debugger  breakpoints and watch variables can be set to stop the program at points  you set and provide additional data as the code is run     You can run any GAUSS program file by selecting Debug Current File or Debug Main  File from the Debug mene  This automatically starts debugging the file in the GAUSS  Debug window     Using the Windows Interface    The Debugger uses the following color codes   e Yellow highlighting indicates the next line of code to be run  e Red highlighting indicates a breakpoint    The current status of variables specified using the Watch option is shown above the  Status bar  The number of lines executed appears on the Status bar as well as the file  name  shows the number of lines executed  The current file  active line and the  procedure being run     You can select from the following options     Step Into runs the next executable line of code in the application and steps into  procedures     Toolbar Shortcut   Keyboard Shortcut  Ctrl I    Step Over runs the next executable line of code in the application but does not step  into procedures     Toolbar Shortcut   Keyboard Shortcut  Ctrl V    Step Out runs the remainder of the current procedure and stops at the next line in the  calling procedure  Step out returns if a breakpoint is encountered     ra  Toolbar Shortcut   Keyboard Shortcut  Ctrl O    Run to Breakpoint runs all the remaining prog
7.   4        6xinv  8   9       3 14    6   2    sqrt 3  4      a     bxc          a b  c  d  e    a        d     a b  d  c    a     c d    74     2x 31     A computer language needs facilities for decision making and looping to control the    order in which computations are done  GAUSS has several kinds of flow control    statements     Language Fundamentals    Looping    do loop  The do statement can be used in GAUSS to control looping     do while scalar_expression     loop if expression is true       Statements    endo   also  do until scalar_expression     loop if expression is    false       Statements    endo     The scalar_expression is any expression that returns a scalar result  The expression  will be evaluated as TRUE if its real part is nonzero and FALSE if it is zero     There is no counter variable that is automatically incremented in a do loop  If one is  used  it must be set to its initial value before the loop is entered  and explicitly  incremented or decremented inside the loop     4 23    Using GAUSS for Windows95    4 24    The following example illustrates nested do loops that use counter variables   format  rdn 1 0       Y rr    space      comma             i   1   do while i  lt  4   J  Ly  do while j  lt  3   print space i comma j    j   3 1   endo   i   itl   print     endo     This will print   1 1 1 2 1 3  2 1 2 2 2 3  3 1 3 2 3 3  4 1 4 2 4 3    Use the relational and logical operators without the dot       in the expression that  controls a do loo
8.   ABCDEFGHIJ12345678901234567890 lt CR gt  lt LF gt                  position 1 10 20 30 31 32    14 7    Using GAUSS for Windows95    This example     invar record 32   1 3  group dept   11 4 2  x 3     5     Y     will result in     variable value    type       group ABC  dept DEF  X1 12 34  X2 56 78  X3 90 12  Y 34567    This example     character  character  numeric  numeric  numeric    numeric    invar record 32   dept    2  id      5  wage    2  area    will result in     variable value type   dept ABCDEFGH character   id IJ character   WAGE 12345 numeric   AREA 67 numeric  msym    Specifies the character in the input file that is to be interpreted as a missing value     This example     msym         Defines the character     as the missing value character     The default         dot  will always be interpreted as a missing value unless it is part of a    numeric value     14 8    Utilities    nocheck    Optional  suppresses automatic checking of packed ASCII record length and output  data type  The default is to increase the record length by 2 bytes if the second record in  a packed file starts with cr lf  and any files that have explicitly defined character data  will be output in double precision regardless of the type specified     output    The name of the GAUSS data set  A file will be created with the extension   dat   For  example     output c  gauss dat test     creates the file test  dat on the c   gauss dat directory     outtyp    Selects the numerical accura
9.   CTRL   CTRL   CTRL   CTRL   CTRL   CTRL   CTRL   CTRL   CTRL     CTRL     CTRL        Select text to the end of the document     Open bookmark dialog box   Copy selected text to the Windows Clipboard  Toggle Debug Output window  Find Replace text   Go to line number   Open a new  untitled window   Open a file and start a new window  Print current window  or selected text  Quit GAUSS   Run file   Save window to file    Paste text from Windows Clipboard to the  active window    Cut selected text and place a copy on the  Windows Clipboard    Undo the last edit    Function Keys    Menu Keys    Fl    F2  F3  F4  F5    F6  F7  F10  F11  F12    ALT F4    CTRL   CTRL   CTRL   CTRL   CTRL     HF1       SHFT F2    ESC    ALT A  ALT C       Using the Windows Interface    Open the GAUSS Help  system or  if you have  selected a GAUSS keyword  or other supported object   Context Sensitive Help    Execute Main File  Find again  Replace again    Toggle Command Output  window    Toggle operating mode  Clear to end of text   Select Menu bar   Toggle macro record on off  Playback macro   Quit GAUSS   Source file browser  Execute GAUSS   Close active window  Switch to next window    Jump to nth bookmark in  bookmark list    Insert GAUSS prompt    Unmark marked text    Action Menu    Configuration  Menu    3 7    Using GAUSS for Windows95       ALT E Edit Menu  ALT D Debug Menu  ALT F File Menu  ALT H Help Menu  ALT M Mode Menu  ALT S Search Menu  ALT W Window Menu  Edit Keys  KEYPAD PLUS Copy 
10.   Right one word   Beginning of the line   End of the line   Next screen up   Next screen down   Top of the window   Bottom of the window  Beginning of the document  End of the document    Delete the character to the left of the cursor or  delete selected text   Delete the character to the right of the cursor or  delete selected text   Copy the selected text to the Clipboard   Delete the selected text and place it onto the  Clipboard   Paste text from the Clipboard at the caret   Undo the last editing action   Copy the selected text or the current line to the  Clipboard  BRIEF keypad preference only   Delete the selected text or the current line and place  it onto the Windows Clipboard  BRIEF keypad  preference only    Paste text from the Windows Clipboard to the  cursor position  BRIEF keypad preference only   Undo the last editing action  BRIEF keypad  preference only     Select one line of text up    Select one line of text down   Select one character to the left   Select one character to the right     SHIFT CTRL LEFT ARROW Select one word to the left   SHIFT CTRL RIGHT ARROW Select one word to the right              SHIFT HOME  SHIFT END  SHIFT PAGE UP  SHIFT PAGE DOWN  SHIFT CTRL HOME       Select to the beginning of the line   Select to the end of the line   Select up one screen    Select down one screen    Select text to the beginning of the    document     3 5    Using GAUSS for Windows95    Shortcut Keys    SHIFT CTRL END    Command Keys    3 6    CTRL   CTRL   CTRL 
11.   line         A null byte  000 is used to separate strings in_plegstr and _pmsgstr   _pmsgstr      First string 000Second string 000Third  string      or    _plegstr      Curve 1 000Curve 2        A t  Use the       to create the expression M t    Ele           _pmsgstr      M t    E e tx          Use the   to generate   and   in an X axis label     xlabel     Data used for x is  data    1 2 3           Selecting Fonts    13 10    Four fonts are supplied with the Publication Quality Graphics system  They are  Simplex  Complex  Simgrma  and Microb   For the characters available in each font   see Appendix A      Fonts are loaded by passing to the fonts procedure a string containing the names of  all fonts to be loaded  For example  this statement will load all four fonts     fonts     simplex complex microb simgrma          Publication Quality Graphics    The fonts command must be called before any of the fonts can be used in text  strings  A font can then be selected by embedding an escape code of the form     20n     in the string that is to be written in the new font  The n will be 1  2  3  or 4  depending  on the order in which the fonts were loaded in fonts     If the fonts were loaded as in the previous example  the escape characters for each  would be      201 Simplex   202 Complex   203 Microb    204 Simgrma    The example then for selecting a font for each string to be written would be     title     201This is the title using Simplex font               xlabel      20
12.   there will be no shift  Default is 0     Note  Used internally   For the same functionality  see axmargin in  the GAUSS Language Reference   This is used by the graphics panel  routines  The user must not set this when using the graphic panel  procedures    2x1 vector  size of the axes area in inches  If scalar 0  the maximum  size will be used    Note  Used internally   For the same functionality  see axmargin in  the GAUSS Language Reference   This is used by the graphics panel  routines  The user must not set this when using the graphic panel  procedures    scalar or Kx1 vector  line type for the main curves  If this is a nonzero  scalar  all lines will be this type  If scalar 0  line types will be default  styles  Default is 0    dashed   dotted   short dashes   closely spaced dots   dots and dashes   solid    NU F amp F WN FE    13 23    Using GAUSS for Windows95    The default line types come from a global vector called _plsel   This vector can be changed by editing pgraph dec to change the  default line types   _pl1sel is not documented elsewhere      _plwidth scalar or Kx1 vector  line thickness for main curves  This value may  be zero or greater  A value of zero is normal  single pixel  line width   Default is 0     _pmcolor     9xl vector  color values to use for plot  see    Colors     page 10 12      1  axes     2  axes numbers    3  X axis label    4  Y axis label    5  Z axis label    6  title     7  box     8  date     9  background     If this is scalar  it 
13.   x    y    n   s   agepaysex    sa age pay sex    Character Matrices    Matrices can have either numeric or character elements  For convenience  a matrix  containing character elements is referred to as a character matrix     A character matrix is not a separate data type  but gives you the ability to store and  manipulate data elements that are composed of ASCII characters as well as floating  point numbers  For example  you may want to concatenate a column vector containing  the names of the variables in an analysis onto a matrix containing the coefficients   standard errors  t statistic  and p value  You can then print out the entire matrix with a  separate format for each column with one call to the function print fm     4 18    Language Fundamentals    The logic of the programs will dictate the type of data assigned to a matrix  and the  increased flexibility allowed by being able to bundle both types of data together in a  single matrix can be very powerful  You could  for instance  create a moment matrix  from your data  concatenate a new row onto it containing the names of the variables   and save it to disk with the save command     Numeric matrices are double precision  which means that each element is stored in 8  bytes  A character matrix can thus have elements of up to 8 characters     GAUSS does not automatically keep track of whether a matrix contains character or  numeric information  The ASCII to GAUSS conversion program ATOG will record  the types of variab
14.  12 2  See also  lineson in the GAUSS Language  Reference     The syntax for  srcfile and  srcline is different than for the other directives  that take arguments  Typically  directives do not take arguments in parentheses  that is   they look like keywords      define red 4     srcfile and  srcline  however  do take their arguments in parentheses  like  procedures       srcline 12     This allows you to place  srcline statements in the middle of GAUSS commands   so that line numbers are reported precisely as you want them  For example      srcline 1  print    Here is a multi line      srcline 2     sentence  if it contains a run time    error            srcline 3     you will know exactly           srcline 4     which part of the sentence has the    problem         The argument supplied to  srcfile does not need quotes      srcfile c  gauss test e     Procedures    A procedure allows you to define a new function which you can then use as if it were  an intrinsic function  It is called in the same way as an intrinsic function     y   myproc a b c      Procedures are isolated from the rest of your program and cannot be entered except by  calling them  Some or all of the variables inside a procedure can be local variables   local variables exist only when the procedure is actually executing  and then    4 6    Language Fundamentals    disappear  Local variables cannot get mixed up with other variables of the same name  in your main program or in other procedures     For details
15.  24 27 28 32 36    5 6    Operators       Horizontal direct product    Z x    y   12   x   34   2 56   y    78   _ 5 6 1012  21 24 28 32    The input matrices x and y must have the same number of rows  The result will  have cols x    cols y  columns   Other Matrix Operators       Transpose operator  yun        The columns of y will contain the same values as the rows of x  and the rows of y  will contain the same values as the columns of x  For complex matrices  this  computes the complex conjugate transpose     If an operand immediately follows the transpose operator  the   will be interpreted  as       Thus y   x   x is equivalent toy   x     x        Bookkeeping transpose operator  yprnx       This is provided primarily as a matrix handling tool for complex matrices  For all  matrices  the columns of y will contain the same values as the rows of x  and the    rows of y will contain the same values as the columns of x  The complex  conjugate transpose is NOT computed when you use          If an operand immediately follows the bookkeeping transpose operator  the       will be interpreted as        Thus y   x     x is equivalent toy   x      x     5 7    Using GAUSS for Windows95      Vertical concatenation    z   xly   1 23  x   345  Y  789  123  z  345  789      Horizontal concatenation    Z   xy   12  p    3 4  ds 56  78  _ 1256  A  3478    Relational Operators    5 8    For details on how matrix conformability is defined for element by element operators   see    Element b
16.  GAUSS for Windows95    If the data is a row vector  an unsigned integer equaling the number of columns in the  vector will precede the data  along with 4 padding bytes     If the data is a column vector or a matrix  there will be two unsigned integers  preceding the data  The first will represent the number of rows in the matrix and the  second will represent the number of columns     The data area always begins on an even 8 byte boundary  Numbers are stored in  double precision  8 bytes per element  16 if complex   For complex matrices  all of the  real parts are stored first  followed by all the imaginary parts     Data Set v96    9 20       Offset Description   0 3 always OXFFFFFFFF   4 7 always 0   8 11 always OXFFFFFFFF   12 15 always 0   16 19 always OXFFFFFFFF   20 23 OxFFFFFFFF for forward byte order  0 for backward byte order   24 27 OxFFFFFFFF for forward bit order  0 for backward bit order   28 31 0xABCDEF02   32 35 version  currently 1   36 39 reserved   40 43 floating point type  1 for IEEE 754   44 47 12   signed 2 byte integer  1004   single precision floating point  1008   double precision float   48 51 2  4  or 8  the size of an element in bytes   52 55 0   real matrix  1   complex matrix   56 59 1   imaginary part of matrix follows real part  standard GAUSS style   2   imaginary part of each element immediately follows real part   FORTRAN style    60 63 always 2    File I O       Offset Description   64 67 1   row major ordering of elements  2   column majo
17.  If you want to get the data set name from a string variable and the variable names from  a character vector  use    dataset    olsdat      let vnames age pay sex     create fl1  dataset with    vnames  0 2     The substitution operator     works with load and save  also   lpath    c  gauss procs        name    mydata            load path  lpath x  name     command    dir   fmt        The general syntax is       variable_name    Expressions are not allowed     Language Fundamentals    The following commands are supported with the substitution operator         create fl1  dataset with    vnames  0 2        create fl  dataset using     cmdfile     open f1    dataset      output file  outfile     load  load  save    save    x    datafile   path  lpath x y z t w      name X     path  spath     run    prog     msym    mstring     String Arrays    String arrays are NxK matrices of strings  Here is a partial list of the functions for  manipulating string arrays                     td    declare  delete  fgetsa  fgetsat  format  fputs  fputst  let  loads  lprint    lshow    Vertical string array concatenation operator    Horizontal string array concatenation operator    Extract subarrays or individual strings from their corresponding array   or assign their values     Transpose operator     Bookkeeping transpose operator    Initialize variables at compile time    Delete specified global symbols    Read multiple lines of text from a file    Read multiple lines of text from a file  dis
18.  Run Current File  button on the Toolbar   e Clicking the GAUSS Status on the status bar     Note  If a block of code is selected  then this block  and not the entire file will be  executed  The current line number is displayed on the Status bar     You can execute the file displayed on the Main file list  the main file  by using one of  the following     Selecting Run Main file on the Action men   Pressing F2   Clicking the  Run Main file  icon on the Toolbar     Options      An Output Mode option specifies whether the output is displayed in the Command  window  Cmnd I O  or the Output window  Split I O   You can toggle this option  by clicking the status on the Status bar       An Enter to Execute option is available which determines whether typing  lt   Enter gt  will execute the GAUSS command or not  You can toggle this option by  clicking the status of this option on the Status Bar     Editing Keys    Cursor Movement Keys    UP ARROW Up one line  DOWN ARROW Down one line  LEFT ARROW Left one character  RIGHT ARROW Right one character  CTRL LEFT ARROW Left one word    3 4    CTRL RIGHT ARROW  HOME   END   PAGE UP   PAGE DOWN  CTRL PAGE UP  CTRL PAGE DOWN  CTRL HOME  CTRL END       Editing Keys    BACKSPACE  DEL    CTRL INS or CTRL C  SHIFT DEL or CTRL X       SHIFT INS or CTRL V  CTRL Z  KeyPad PLUS        KeyPad MINUS        INS       Asterisk     Text Selection Keys    SHIFT UP ARROW  SHIFT DOWN ARROW  SHIFT LEFT ARROW  SHIFT RIGHT ARROW    Using the Windows Interface  
19.  Run Program is grayed and not available in this window  You must run the commands  or file from either the Command or Edit window     Output is shown below the code in Command mode  In Split I O mode  the output  appears in the Output window  To toggle between the current input and the Output  window  use the Toggle Input Output Window command     Toolbar Shortcut     Run Command    Run Current File    Run marked block  Keyboard Shortcut  Ctrl F2    Pause Program    You use the Pause Program command to suspend a program while it is in the process  of running     Using GAUSS for Windows95    Output is shown below the code in Cmnd mode  In Split I O mode  the output appears  in the Output window  To toggle between the current input and the Output window   use the Toggle Input Output Window command     Resume Program    You use the Resume Program command to restart program execution after using the  Suspend Job command     During execution  output is displayed beneath the current block of GAUSS code if the  output mode is set to Cmnd and to the Output Window if the output mode is set to  Split I O  To toggle between the current input and the Output window  use the Toggle  Command Output Window command     Toolbar Shortcut     Execute command    Execute file    Execute marked block  Keyboard Shortcut  Ctrl F2    Stop Program    You use the Suspend Program command to stop a program while it is in the process of  running     Output is shown below the code in Cmnd mode  In Split I 
20.  Window if the output mode is set to  Split T O     Note  this command is different than the GAUSS Compile command  which compiles  a program and saves the pseudocode as a file     Toolbar Shortcut     Status Bar    The Status bar is located along the bottom of the GAUSS window  The status of the  following windows and processes are shown on the Status bar     GAUSS Status    The first section of the Status bar shows the current GAUSS status  The normal status  is Ready when not running code  From time to time you are alerted to the task GAUSS  is performing by new messages appearing in this section of the Status bar     Clicking the GAUSS status is equivalent to clicking the Run Program icon on the  Toolbar     Command Window    Command  Edit  and Output always appear on the Status bar  When the background  color behind Command is a lighter shade of gray  the Command window has focus  and is considered the  active  window     You enter interactive commands in the Command window  The Command window  can be selected from the Windows menu or from the Status bar by clicking on  Command  When the output mode is Cmnd I O  output will be written to the  Command window     Edit Window    Command  Edit  and Output always appear on the Status bar  When the background  color behind Edit is a lighter shade of gray  the Edit window has focus and is  considered the  active  window     Using the Windows Interface    An Edit window is created when you open a file  When you execute GAUSS fro
21.  a split  window     e You use the Split Vertically command to split the active window into two vertical  panes  When a window is split  a splitter bar appears between the two sides of the  window and is used to define where the window split is positioned     e You use the Split Horizontally command to split the active window into two  horizontal panes  When a window is split  a splitter bar appears between the upper    Using the Windows Interface    and lower half of the window and is used to define where the window split is  positioned     You can move the splitter bar by dragging it with the mouse   Toolbar Shortcut     No Split    Split Vertically    Split Horizontally    GAUSS Reference    You use the GAUSS Reference command to access the online GAUSS Language  Reference guide  The Guide contains the syntax for each GAUSS command     Toolbar Shortcut     Run Commands    The Run commands allow you to run the code you have entered  a block of code you  selected  or the active file  depending on the active window  The following entries  appear on the Action menu of the respective windows     Command window    Run Commands runs the commands you enter in the Command window   Run Marked Block runs the text you selected in the Command window     Edit window    Run Current File runs the active file   Run Marked Block runs the text you selected in the Edit window     Output window    Run Program is grayed and not available in this window  You must run the commands  or file from e
22.  arrow 13 13   bar 13 15   box 13 16   pbox 13 16   z level 13 5  comma 5 13  command 4 2  comments 4 29  comparison operator 4 30  compilation phase 12 3  compile 8 1    Index 2    compile time 4 1  compiled language 4 1  compiler 8 1   complex 14 3   complex constants 4 11  complex  atog command 14 1  concatenation  matrix 5 8  conditional branching 4 26  configuration 2 5  conformability 5 1  constants  complex 4 11  contour 13 1   contour levels 13 19  control  flow 4 22  coordinates 13 6  cropping 13 2  13 17    D       data loop 12 1   data sets 9 6  dataloop 12 1   date 13 3  debugging 8 2  delete 12 2  delimited files 9 3  delimited  hard 14 5  delimited  soft 14 4  descriptor file 9 14  division 5 5   do loop 4 23   dot relational operator 5 17  5 18  draw 13 1   drop 12 2    E       element by element conformability 5 1  element by element operators 5 1  empty matrix 4 11   endp 6 2  6 5   endwind 13 7   eq 5 9    eq 5 10   eqv 5 13    eqv 5 13   error bar 13 7  13 17   ExE conformable 5 1   executable code 4 3   executable statement 4 2  execution phase 12 3   execution time 4 1    exponentiation 5 6   expression  evaluation order 4 21  5 18  expression  scalar 4 25   expressions 4 1   extern 12 2   extraneous spaces 4 29    F       factorial 5 5  FALSE 4 23  file formats 9 11  files 9 1  binary 9 12  matrix 9 12  string 9 13  flow control 4 22  fonts A 1  forward reference 7 1  function 4 28    G       ge 5 10   ge 5 11   global variable 6 1  6 4   graphics text e
23.  atog   Open comment  The command file has a comment that is not closed  Comments must be enclosed in  Es      comment    atog   Out of memory  Notify Aptech Systems   atog   read error  A read error has occurred while converting a packed ASCII file   atog   Record length must be 1 16384 bytes  The record subcommand has an out of range record length   atog   Statement too long  Command file statements must be less than 16384 bytes     atog   Syntax error at   There is unrecognizable syntax in a command file     Utilities    atog   Too many input variables  More input variables were specified than available memory permitted     atog   Too many output variables  More output variables were specified than available memory permitted     atog   Too many variables       More variables were specified than available memory permitted     atog   Undefined variable   A variable requested in an outvar statement was not listed in an invar statement   atog WARNING  missing       at    The parentheses in the delimit subcommand were not closed    atog WARNING  some records begin with cr lf   A packed ASCII file has some records that begin with a carriage return linefeed  The  record length may be wrong    atog   complex illegal for packed ASCII file   A complex command was encountered following an invar command with  record specified    atog   Cannot read packed ASCII   complex specified     An invar command with record specified was encountered following a complex  command     LIBLIST    LIB
24.  close fout    retp  0      endp     Data Sets    GAUSS data sets are the preferred method of storing data for use within GAUSS  Use  of these data sets allows extremely fast reading and writing of data  Many library  functions are designed to read data from these data sets     Layout    GAUSS data sets are arranged as matrices  that is  they are organized in terms of rows  and columns  The columns in a data file are assigned names and these names are  stored in the header or  in the case of the v89 format  in a separate header file     9 6    File I O    The limit on the number of rows in a GAUSS data set is determined by disk size  The  limit on the number of columns is limited by RAM  Data can be stored in 2  4  or 8  bytes per number  rather than just 8 bytes as in the case of GAUSS matrix files     The ranges of the different formats are     Data Significant       Bytes Type Digits Range  2 integer 4  32768  lt  X  lt  32767  4 single 6 7 8 43E 37  lt   X   lt  3 37E 38  8 double 15 16 4 19E 307  lt   X   lt  1 67E 308       Creating Data Sets    Data sets can be created with the create command  The names of the columns  the  type of data  etc   can be specified   For details  see create in the GAUSS Language  Reference      Data sets  unlike matrices  cannot change from real to complex  or vice versa  Data  sets are always stored a row at a time  The rows of a complex data set  then  have the  real and imaginary parts interleaved  element by element  For this reason  yo
25.  current block of GAUSS code if the  output mode is set to Cmnd  or in the Output Window if the output mode is set to Split  T O     Note  this command is different than the GAUSS Compile command  which compiles  a program and saves the pseudocode as a file     Toolbar Shortcut     Set Main File    You use the Set Main File command to make the active file the main file in the Edit  window     Using GAUSS for Windows95    Clear Main File List    You use the Clear Main File List command to remove all entries in the main file list on  the Toolbar     Matrox Editor    You use the Matrix Editor to create or edit data in a matrix  or grid   A cell can be  edited by typing in a new value and pressing Enter  Only numeric values can be  entered in a grid     You use the New command to create a new blank grid of the size you specify  When  the matrix is saved to the GAUSS workspace  the name appearing on the Title bar will  be used     You use the Load command to clear any existing grid and copy any named matrix  from the GAUSS workspace to the grid  Use Reload to reload the existing matrix with  the name shown on the Title bar     You use the Clear command to clear the grid of all values but keep the row and  column order     You use the Save command to save the grid as a matrix in the GAUSS workspace  Ifa  matrix of the same name already exists in the workspace  it is overwritten     You use the Exit command to close and exit the Matrix Editor     You use the Options command to set s
26.  data set variables     When you create a data set  you can supply a vector indicating the type of data in each  column of the data set  For example     data     M 32 21500   F 27 36000   F 28 19500   M 25 32000       vnames      a       sex       Age       Pay       gt     a    vtypes   O11       Il    create f mydata with    vnames  3  8  vtypes   call writer f data      f   close f      To retrieve the type vector  use vartypef     open f   mydata for read   vn   getnamef  f    vt   vartypef  f      print vn      print vt      Sex Age Pay  0 1 1    Using GAUSS for Windows95    9 10    The function getnamef in the previous example returns a string array rather than a  character vector  so you can print it without the         prefix     Using the Uppercase Lowercase Convention  v89 Data Sets     This is obsolete  use vartypef and v96 data sets to be compatible with future  versions     The following method for distinguishing character numeric data will soon be  obsolete  use the Type Vectors method described earlier     To distinguish numeric variables from character variables in GAUSS data sets  some  GAUSS application programs recognize an    uppercase lowercase    convention  if the  variable name is uppercase  the variable is assumed to be numeric  if the variable  name is lowercase  the variable is assumed to be character  The ATOG utility program  implements this convention when you use the   and   operators to toggle between  character and numeric variable names liste
27.  defaulted to 8    Character data has been found in the output data set before an outtyp 2 or  outtyp 4 statement  This is a warning only     15 19    Using GAUSS for Windows95    15 20    G0410    G0411    G0412    G0413    G0414    G0415    G0416    G0417    G0418    G0419    G0421    G0428    G0429    G0431    G0432    G0433    outtyp must equal 2  4  or 8  outtyp override   precision set to 8    Character data has been found in the output data set after an outtyp 2 or  outtyp 4 statement  This is a warning only     default not allowed in recode statement    default allowed only in code statement     Missing file name in dataloop statement    Invalid listwise statement    Invalid lag statement    lag variable is a number    lag variable is a procedure    Cannot lag External Variable    Cannot lag String Constant    compile command not supported in Run Time Module    Cannot use debug command inside program    Invalid number of subdiagonals    Error closing dynamic library    Error opening dynamic library    Cannot find DLL function    G0435    G0436    G0437    G0438    G0439    G0441    G0442    G0445    G0447    G0454    G0456    G0457    G0458    G0459    G0460    G0461    G0462    Error Messages    Invalid mode    Matrix is empty    loadexe not supported  use dlibrary instead    callexe not supported  use dllcall instead    File has wrong bit number    Type vector malloc failed    No type vector in gfblock    Illegal left hand side reference in procedure    vfor called 
28.  details of their  operation separate from the other parts of the program  This makes programs easier to  understand and easier to maintain     A procedure in GAUSS is basically a user defined function that can be used as if it  were an intrinsic part of the language  A procedure can be as small and simple or as  large and complicated as necessary to perform a particular task  Procedures allow you  to build on your previous work and on the work of others  rather than starting over  again and again to perform related tasks     Any intrinsic command or function may be used in a procedure  as well as any user   defined function or other procedure  Procedures can refer to any global variable  that  is  any variable in the global symbol table that can be shown with the show command   It is also possible to declare local variables within a procedure  These variables are  known only inside the procedure they are defined in and cannot be accessed from  other procedures or from the main level program code     All labels and subroutines inside a procedure are local to that procedure and will not  be confused with labels of the same name in other procedures     6 1    Using GAUSS for Windows95    Defining a Procedure    A procedure definition consists of five parts  four of which are denoted by explicit    GAUSS commands     1  Procedure declaration proc statement  2  Local variable declaration local statement  3  Body of procedure   4  Return from procedure retp statement  5  End of pr
29.  drawn  Location values are in plot coordinates      M 1  x location    M 2  left end of error bar    M  3  right end of error bar    M  4  y location    M  5  bottom of error bar    M  6  top of error bar    M  7  line type    1 dashed  dotted  short dashes  closely spaced dots  dots and dashes  solid   M  8  color  see    Colors     page 10 12     NU hu NN     M  9  line thickness  This value may be zero or greater  A value  of zero is normal line width     13 18    _pframe    _pgrid    _plctrl    Publication Quality Graphics    To create one error bar using solid lines  use  _perrbar    10221362 0       2x1 vector  controls frame around axes area  On 3 D plots  this is a  cube surrounding the 3 D workspace      1  1 frame on   O frame off    2  1 tick marks on frame     O no tick marks   The default is a frame with tick marks   2x1 vector to control grid    1  grid through tick marks   O no grid  1 dotted grid  2 fine dotted grid  3 solid grid   2  grid subdivisions between major tick marks   O no subdivisions  1 dotted lines at subdivisions  2 tick marks only at subdivisions  The default is no grid and tick marks at subdivisions     scalar or Kx1 vector to control whether lines and or symbols will be  displayed for the main curves  This also controls the frequency of  symbols on main curves  The rows  K  is equal to the number of  individual curves to be plotted in the graph  Default is 0     0 draw line only    gt 0 draw line and symbols every _plctrl points    lt 0 draw
30.  editor  The default  color is the system background color     The Scrollbars control specifies the type of scrollbar used  none  horizontal  vertical   both  or auto  The default is vertical     The Window Style control specifies whether windows are initially opened with a  normal  maximized  default   or dual screen windowstate  In dual screen  the input file  is shown in one window and the output file in a second window     The Output Focus control specifies how the focus follows the Output window  In the  default  if text is written to the output window  the focus rests with that window  The  alternative is for the focus to rest with the Command or File window     The Icons as Text control specifies whether the icons are displayed with pictures   default  or text  If this option is changed  the new settings will be fully implemented  the next time GAUSS is launched     Options Tab    The Auto Backup option automatically creates a backup of each open document under  the same path and filename  but with a BAK extension  If the original document had a  BAK extension  the backup uses a BK1 extension  New documents  which are  untitled  are not backed up  The frequency of the backup  in minutes  is set in the  appropriate box  The default is no auto backup     The Sound at end of job option determines whether a sound is played at the end of the  execution of a set of GAUSS code  The current sound can be tested using the Test  button  and the sound file can be selected using th
31.  fin2 fout        In the previous example  data sets dat1 dat and dat2 dat are opened for  reading  The variable names from each data set are read using getname  and  combined in a single vector called varnames  A variable called ot yp is created that  will be equal to the larger of the two data types of the input files  This will ensure the  output is not rounded to less precision than the input files  A new data set daty dat  is created using the create     with     command  Then  on every iteration  of the loop  400 rows are read in from each of the two input data sets  horizontally  concatenated  and written out to dat y  dat  When the end of one of the input files is  reached  reading and writing will stop  The closeal1 command is used to close all  files     File I O    Distinguishing Character and Numeric Data    Although GAUSS itself does not distinguish between numeric and character columns  in a matrix or data set  some of the GAUSS Applications programs do  When creating  a data set  it is important to indicate the type of data in the various columns  The  following discusses two ways of doing this     Using Type Vectors    The v8 9 data set format distinguishes between character and numeric data in data sets  by the case of the variable names associated with the columns  The v96 data set  format  however  stores this type of information separately  resulting in a much cleaner  and more robust method of tracking variable types  and greater freedom in the naming  of
32.  first will represent the number of rows in the matrix and the  second will represent the number of columns     The data area always begins on an even 8 byte boundary  Numbers are stored in  double precision  8 bytes per element  16 if complex   For complex matrices  all of the  real parts are stored first  followed by all the imaginary parts     String v92  Obsolete        Offset Description   0 3 always 0   4 7 always OXEECFCFCF   8 11 reserved   12 15 reserved   16 19 reserved   20 23 size of string in units of 8 bytes   24 27 length of string plus null terminator in bytes  28 127 reserved    Using GAUSS for Windows95    The size of the data area is always divisible by 8  and is padded with nulls if the length  of the string is not evenly divisible by 8  If the length of the string is evenly divisible  by 8  the data area will be the length of the string plus 8  The data area follows  immediately after the 128 byte header     Data Set v92  Obsolete     9 18    Offset Description       0 3 always 0  4 7 always OXEECACACA  8 11 reserved    12 15 reserved   16 19 reserved   20 23 rows in data set   24 27 columns in data set   28 31 0   real data set  1   complex data set  32 35 type of data in data set  2  4  or 8   36 39 header size in bytes is 128   columns   9  40 127 reserved    The variable names begin at offset 128 and are stored 8 bytes each in ASCII format   Each name corresponds to one column of data  Names less than 8 characters are  padded on the right with bytes o
33.  graphic panels     13 5    Using GAUSS for Windows95    As Example 3 illustrates  the code between graphic panel functions  that is  setwind  or nextwind  may include assignments to global variables  a call to graphset  or  may set up new data to be passed to the main graphics routines     You are encouraged to run the example programs supplied with GAUSS  Analyzing  these programs is perhaps the best way to learn how to use the PQG system  The  example programs are located on the examples subdirectory     Graphics Coordinate System    PQG uses a 4190x3120 pixel grid on a 9 0x6 855 inch printable area  There are three  units of measure supported with most of the graphics global elements     Inch Coordinates    Inch coordinates are based on the dimensions of the full size 9 0x6 855 inch output  page  The origin is  0 0  at the lower left corner of the page  If the picture is rotated   the origin is at the upper left   See    Inch Units in Graphics Graphic Panels     page 13   9      Plot Coordinates    Plot coordinates refer to the coordinate system of the graph in the units of the user   s X   Y  and Z axes     Pixel Coordinates    Pixel coordinates refer to the 4096x3120 pixel coordinates of the full size output page   The origin is  0 0  at the lower left corner of the page  If the picture is rotated  the  origin is at the upper left     Graphics Graphic Panels    Multiple graphic panels for graphics are supported  These graphic panels allow the  user to display multiple g
34.  input     or  x   getf    myfile    0      read a file into a string       They can be printed like this     print x     A character matrix must have a         prefixed to it in a print statement     print  x     A string can be saved to disk with the save command in a file with a   fst  extension  and then loaded with the load command     save xX   loads x   or    loads x x fst     The backslash is used as the escape character inside double quotes to enter special  characters     Sp  backspace  ASCII 8    We    escape  ASCII 27    DAE    formfeed  ASCII 12        g    beep  ASCII 7    m1    line feed  ASCII 10       NET carriage return  ASCII 13       Mt    tab  ASCII 9    NAS a backslash   SAHARA    the ASCII character whose decimal value is    HHP    Using GAUSS for Windows95    4 16    When entering DOS pathnames in double quotes  two backslashes must be used to  insert one backslash     st      c   gauss  myprog prg        An important use of strings and character elements of matrices is with the substitution  operator         In the command  create f1   olsdat with x 4 2     by default  GAUSS will interpret the olsdat as a literal  that is  the literal name of  the GAUSS data file you want to create  It will also interpret the x as the literal prefix  string for the variable names  x1 x2 x3 x4     If you want to get the data set name from a string variable  the substitution operator      could be used as    dataset    olsdat           create fl1  dataset with x 4 2    
35.  is standard   thus the  keypad  keys use their respective characters  and the INSERT key toggles  between Insert mode and Overstrike mode  The alternative  based on the BRIEF  editor  uses the  keypad  PLUS and  keypad  MINUS keys  respectively  to copy or  cut a block if a block is selected  or the current line if no block is selected  The  INSERT key pastes the current clipboard contents at the caret  The  keypad   ASTERISK key undoes the last edit command     Tabs Tab    The Tab Spacing box sets the number of spaces between tab stops     the range is from  1 to 48  with a default of 8  The spacing is defined in terms of the fixed system font     The Expand Tabs option lets the TAB key insert the number of spaces specified in Tab  Spacing  but uses spaces rather than the TAB character in the file  This option is useful  when the Column Text Select mode is specified  This option is disabled in documents  that use a proportional font  The default is off     Using GAUSS for Windows95    The Auto Indent option determines how the editor responds to the ENTER key  When  checked  the next line starts under the first non blank character of the previous line   The default is off     Display Tab    The Font Type control specifies which font attributes the editor uses  the default font  is FixedSys  Attributes that can be controlled are font name  font size  font color  and  the font styles normal  bold  and italic     The Back Color control specifies the background color used by the
36.  number   getwind Get current graphic panel number    savewind Save graphic panel configuration to a file   loadwind Load graphic panel configuration from a file     This example creates four tiled graphic panels and one graphic panel that overlaps the  other four     library pgraph   graphset     begwind     window 2 2 0     Create four tiled graphic panels           2 rows  2 columns        xsize   9 2     Create graphic panel that overlaps       the tiled graphic panels     ysize   6 855 2     makewind  xsize  ysize  xsize 2 ysize 2 0         x   sega 1 1 1000      Create X data       y    sin x    1    10      Create Y data       13 8    Publication Quality Graphics             setwind  1      Graph  1  upper left corner     xy  X Y     nextwind     Graph  2  upper right corner     logx  x y     nextwind     Graph  3  lower left corner     logy  x y     nextwind     Graph  4  lower right corner     loglog x y     nextwind     Graph  5  center  overlayed     bar  x y     endwind     End graphic panel processing              display graph       Inch Units in Graphics Graphic Panels    Some global variables allow coordinates to be input in inches  If a coordinate value is  in inches and is being used in a graphic panel  that value will be scaled to window  inches and positioned relative to the lower left corner of the graphic panel  A  graphic panel inch is a true inch in size only if the graphic panel is scaled to the full  window  otherwise  X coordinates will be scaled re
37.  of string  G0155 Nested procedure definition  A proc statement was encountered inside a procedure definition     G0156 Illegal redefinition of procedure    You are attempting to turn a procedure into a matrix or string  If this is a name  conflict  delete the procedure     G0157 Illegal redefinition of matrix  G0158 endp without proc  You are attempting to end something you never started     G0159 Wrong number of parameters    You called a procedure with the wrong number of arguments     G0160 Expected string variable  G0161 User keywords return nothing  G0162 Can t save proc keyword fn with global references    Remove the global references or leave this in source code form for the  autoloader to handle   See library in the GAUSS Language Reference      G0163 Wrong size format matrix    G0164 Bad mask matrix    G0165 Type mismatch or missing arguments    G0166 Character element too long    The maximum length for character elements is 8 characters     G0167 Argument must be column vector    15 13    Using GAUSS for Windows95    G0168 Wrong number of returns    The procedure was defined to return a different number of items     G0169 Invalid pointer    You are attempting to call a local procedure using an invalid procedure  pointer     G0170 Invalid use of ampersand  G0171 Called symbol is wrong type  You are attempting to call a local procedure using a pointer to something else   G0172 Can t resize temporary file  G0173 varindx failed during open  The global symbol table is f
38.  on defining and calling procedures  see    Procedures and Keywords      page 6 1     Data Types    There are two basic data types in GAUSS  matrices and strings  It is not necessary to  declare the type of a variable  but it is good programming practice to respect the types  of variables whenever possible  The data type and size can change in the course of a  program     The declare statement  used for compile time initialization  enforces type  checking     Short strings of up to 8 bytes can be entered into elements of matrices  to form  character matrices   For details  see    Character Matrices     page 4 18      Constants    The following constant types are supported     Decimal  Decimal constants can be either integer or floating point values   1 34e 10  1 34e123   1 34e 10   1 34d 10  1 34d10  1 34d 10  123 456789345    These will be stored as double precision  15 16 significant digits   The range is the  same as for matrices   For details  see    Matrices     page 4 8      4 7    Using GAUSS for Windows95    String  String constants are enclosed in quotation marks        This is a string        Hexadecimal Integer  Hexadecimal integer constants are prefixed with Ox     Ox0ab53def2    Hexadecimal Floating Point    Hexadecimal floating point constants are prefixed with Ov  This allows you to input a  double precision value exactly as you want using 16 hexadecimal digits  The highest  order byte is to the left     0vfff8000000000000    Matrices    4 8    Matrices are 2 d
39.  op matrix  matrix op scalar  scalar op matrix  matrix op vector  vector op matrix  vector op vector    5 1    Using GAUSS for Windows95    In a typical expression involving an element by element operator  zZ xty   conformability is defined as follows     e Ifx andy are the same size  the operations are carried out corresponding  element by corresponding element     132  x  451  374    243  PR ARA  612    375  z  765  986  e Ifxis a matrix and y is a scalar  or vice versa  the scalar is operated on with    respect to every element in the matrix  For example  x   2 will add 2 to every  element of x     132  x  451  374    y  2    354  z  673  596    5 2    Operators    e Ifxis an Nx1 column vector and y is an NxK matrix  or vice versa  the vector  is swept    across    the matrix           vector matrix   1     2 4 3   4  gt  3 1 4   3 6 1 2  result   3 5 4   7 5 8   9 4 5    e Ifxisa1xK column vector and y is an NxK matrix  or vice versa  the vector is  swept    down    the matrix              vector 2 4 3  yyy  2 4 3  matrix 3 1 4  6 1 2  4 8 6  result 5 5 7  8 5 5    5 3    Using GAUSS for Windows95    e When one argument is a row vector and the other is a column vector  the result  of an element by element operation will be the    table    of the two     row vector 2 4 3 1       column vector 2 4 6 5 3       If x and y are such that none of these conditions apply  the matrices are not  conformable to these operations and an error message will be generated     Matrix Operat
40.  operators  are affected by a change in the tolerance     Crout LU Decomposition    crout  x    croutp  x    inv  x    det  x    y x when neither x nor y is scalar and x is square     Cholesky Decomposition    chol  x    invpd  x    solpd  y x    y x when neither x nor y is scalar and x is not square     Using GAUSS for Windows95    Reading and Setting the Tolerance    The tolerance value may be read or set using the sysstate function  cases 13 and  14     Determining Singularity    C 2    There is no perfect tolerance for determining singularity  The default is 1 0e 14  You  can adjust this as necessary     A numerically better method of determining singularity is to use cond to determine  the condition number of the matrix  If the equation    1   cond x    1 eq 1  is true  then the matrix is usually considered singular to machine precision   See    LINPACK for a detailed discussion on the relationship between the matrix condition  and the number of significant figures of accuracy to be expected in the result      Index    Operators and Symbols         5 4    12 1  12 2     12 3      5 14      5 15      5 16     5 5    amp   ampersand  5 14     semicolon  4 2    5 4      5 7     5 4      comma  5 13      dot  5 9  5 10  5 14    5 5      5 6     5 6      5 10      5 10    gt  5 11    gt   5 11       5 6     5 5      5 10     4 1      5 9    gt  5 10    gt   5 10     5 6     5 8     5 8      5 5  1    File Types        feg file 6 12    Global Variables       _pageshf 13 12  _p
41.  or an underscore  The first character must  be alphabetic or an underscore     A label is used as the target of a goto or a gosub  The rule for naming labels is the  same as for matrices  strings  procedures  and functions  A label is followed  immediately by a colon     here     4 29    Using GAUSS for Windows95    The reference to a label does not use a colon     goto here     Assignment Statements  The assignment operator is the equal sign              Y SS E Zy    Multiple assignments must be enclosed in braces      y          mant pow     basel0  x      The comparison operator  equal to  is two equal signs            if x    y   print    x is equal to y        endif     Function Arguments  The arguments to functions are enclosed in parentheses              y   sqrt  x      Indexing Matrices  Brackets           are used to index matrices    x     1 2 3   Ste shir oy  3 7 4   8 9 5   6 1 8      y   x 3 3     z   x 1 2 4 1 3         Vectors can be indexed with either one or two indices     v  123456789      4 30    Language Fundamentals    k   v 3    v 1  6 9        i   Il    x 2 3  returns the element in the second row and the third column of x     x 1 3 5 4 7  returns the submatrix that is the intersection of rows 1  3  and 5 and  columns 4 and 7     x   3  returns the third column of x   x 3 5     returns the submatrix containing the third through the fifth rows of x     The indexing operator will take vector arguments for submatrix extraction or  submatrix assignments 
42.  output xlod2   invar record 32   1 3  client 2  zone    1  reg   20 5     zip     The output data set will contain the following information              name client client2 zone reg ZIP  casel  AEG DRF CST y 60631  case2  EDJ TAJ PST n 98064  case3  GWD NAD MST y 59725  type char char char char numeric          The data set is double precision since character data is explicitly specified   The third example is a hard delimited ASCII file called cp1x asc     The file contains six columns of ASCII data     456 4  345 2  533 2   345 5  524 5  935 3    257 6  624 3  639 5  826 5  331 4  376 4   602 3   333 4  342 1  816 7   452 6   690 8    The ATOG command file is cpl x cmd   input c  gauss cplx asc   output cplx   invar delimit  cvar 3      complex     14 12    Utilities    The output data set will contain the following information                       name cvarl cvar2 cvar3  case 1 456 4   345 21 533 2   345 51 524 5   935 31  case 2  257 6   624 31 639 5   826 51 331 4   376 41  case 3 602 3   333 41 342 1   816 71  452 6   690 81  type numeric numeric numeric          The data set defaults to single precision since no character data is present  and no  outt yp command is specified   Error Messages  atog   Can t find input file  The ASCII input file could not be opened   atog   Can t open output file  The output file could not be opened     atog   Can t open temporary file   Notify Aptech Systems    atog   Can t read temporary file   Notify Aptech Systems    atog   Charact
43.  plotted        against x      _plegctl   1     legend on          title     Example xy Graph         Main title             xy  X Y      Call to main routine       Example 2 Here is the same graph with more of the graphics format controlled by  the user  The first two data sets will be plotted using symbols at graph points only   observed data   the data in the second two sets will be connected with lines  predicted  results         library pgraph     activate PGRAPH library     graphset     reset global variables     x   sega  1  1 100      generate data     y   sin x    y   y   y  8   y  6   y  4     4 curves plotted        against x     _pdate   W     date is not printed       13 3    Using GAUSS for Windows95    13 4          pretri Sf  De  ag O  0 F    2 curves w symbols         2 without     Spltype  f 15 12 br Gaj    dashed  dotted         solid lines     _pstype     1  2  0  O       symbol types        circles squares     _plegctl    2  3  1 7  4 5       legend size and        locations     _plegstr     Sine wave 1  0        4 lines legend text        Sine wave  8 0         Sine wave  6 0         Sine wave  4      ylabel     Amplitude          Y axis label     xlabel     Xx Axis         X axis label          title    Example xy Graph         main title       xy  X Y      call to main routine       Example 3 In this example  two graphics graphic panels are drawn  The first is a  full sized surface representation  and the second is a half sized inset containing a  cont
44.  quartile ranges with  a filled circle representing the 50  percentile      2  box color  see    Colors     page 10 12  If this is set to 0  the  colors may be individually controlled using  global variable _pcolor     3  min max style for the box symbol  One of the following     1 minimum and maximum taken from the actual limits  of the data  Elements 4 and 5 are ignored     _pboxlim    _pcolor    _pcrop    Publication Quality Graphics    2 statistical standard with the minimum and  maximum calculated according to interquartile range    as follows    intqrange   75     25    min zes 1  5intqrange  max   75   1  5intqrange    Elements 4 and 5 are ignored     3 minimum and maximum percentiles taken from  elements 4 and 5      4  minimum percentile value  0 100  if _pboxct1 3     3    5  maximum percentile value  0 100  if    _pboxct1  3   3     5xM output matrix containing computed percentile results from  procedure box  M corresponds to each column of input y data      1 M  minimum whisker limit according to_pboxct1 3     2 M  25th percentile  bottom of box      3 M  50th percentile  median      4 M  75th percentile  top of box      5 M  maximum whisker limit according to_pboxct1 3      scalar or Kx1 vector  colors for main curves in xy  xyz  and log  graphs  To use a single color set for all curves  set this to a scalar color  value  If 0  use default colors  Default is 0     The default colors come from a global vector called _pesel  This  vector can be changed by editing p
45.  scalar result  The expression  will be evaluated as TRUE if its real part is nonzero and FALSE if it is zero     GAUSS will test the expression after the if statement  If it is TRUE  the first list of  statements is executed  If it is FALSE  GAUSS will move to the expression after the  first elseif statement  if there is one  and test it  It will keep testing expressions and  will execute the first list of statements that corresponds to a TRUE expression  If no  expression is TRUE  the list of statements following the else statement is executed   After the appropriate list of statements is executed  the program will go to the  statement following the endif and continue on     4 26    Language Fundamentals    Use the relational and logical operators without the dot          in the expression that  controls an if or elseif statement  These operators always return a scalar result     if statements can be nested     One endif is required per if clause  If an else statement is used  there may be  only one per if clause  There may be as many elseif   s as are required  There need  not be any elseif   s or any else statement within an if clause     Unconditional Branching    The goto and gosub statements control unconditional branching  The target of both  a goto and a gosub is a label     goto    A goto is an unconditional jump to a label with no return     label     goto label     Parameters can be passed with a goto  The number of parameters is limited by    available stack spac
46.  sized graphs  or place several overlapping graphs in the  window  Graphic panel size and location are all completely under the user   s control     General Design    GAUSS PQG consists of a set of main graphing procedures and several additional  procedures and global variables for customizing the output     All of the actual output to the window happens during the call to these main routines     bar Bar graphs    box Box plots    contour Contour plots    draw Draws graphs using only global variables   hist Histogram     13 1    Using GAUSS for Windows95    histp Percentage histogram    histf Histogram from a vector of frequencies   loglog Log scaling on both axes    logx Log scaling on X axis    logy Log scaling on Y axis    polar Polar plots    surface 3 D surface with hidden line removal   xy Cartesian graph    xyz 3 D Cartesian graph     Using Publication Quality Graphics    Getting Started    13 2    There are four basic parts to a graphics program  These elements should be in any  program that uses graphics routines  The four parts are header  data setup  graphics  format setup  and graphics call     Header    In order to use the graphics procedures  the pgraph library must be active  This is  done in the Library statement at the top of your program or command file  The next  line in your program will typically be a command to reset the graphics global  variables to the default state  For example     library mylib  pgraph     graphset     Data Setup  The data to be grap
47.  symbols only every _plctrl points    1 all of the data points will be plotted with no    connecting lines     This example draws a line for the first curve  draws a line and plots a  symbol every 10 data points for the second curve  and plots symbols  only every 5 data points for the third curve     eprerrlo   0 DO 5 Ys    13 19    Using GAUSS for Windows95    _plegetl scalar or 1x4 vector  legend control variable     If scalar 0  no legend is drawn  default   If nonzero scalar  create  legend in the default location in the lower right of the page     If 1x4 vector  set as follows     1  legend position coordinate units   1 coordinates are in plot coordinates  2 coordinates are in inches    3 coordinates are in pixels     2  legend text font size  1  lt  size  lt  9  Default is 5    3  x coordinate of lower left corner of legend box    4  y coordinate of lower left corner of legend box     This example puts a legend in the lower right corner   _plegctl   1   This example creates a smaller legend and positions it 2 5 inches from  the left and 1 inch from the bottom    pleget    4   2 3 2451      _plegstr string  legend entry text  Text for multiple curves is separated by a  null byte     1000       For example   _plegstr      Curve 1 000Curve 2 000Curve 3      _plev Mx1 vector  user defined contour levels for contour  Default is 0    See contour in the GAUSS Language Reference      _pline Mx9 matrix  to draw lines  circles  or radii  Each row controls one  item to be drawn  I
48.  unsigned 2 byte integer   12 13 data type in  dat file  2 4 8   unsigned 2 byte integer  14 17 reserved  all 0   s   18 21 reserved  all 0   s   22 23 control flags  unsigned 2 byte integer   24 127 reserved  all 0   s    Column names begin at offset 128 and are stored 8 bytes each in ASCII format   Names with less than 8 characters are padded on the right with bytes of 0     The number of rows in the   dat file is calculated in GAUSS using the file size   columns  and data type  This means that users can modify the  dat file by adding or  deleting rows with other software without updating the header information     Names for the columns should be lowercase for character data  to be able to  distinguish them from numeric data with vartype     GAUSS currently examines only the 4   s bit of the control flags  This bit is set to 0 for  real data sets  1 for complex data sets  All other bits are 0     Data sets are always stored a row at a time  A real data set with 2 rows and 3 columns  will be stored on disk in the following way  from the lowest addressed element to the  highest addressed element           Using GAUSS for Windows95    The rows of a complex data set are stored with the real and imaginary parts  interleaved  element by element  A 2x3 complex data set  then  will be stored on disk  in the following way  from the lowest addressed element to the highest addressed  element      1 1 r  2 11   1 2 r  1 2 i 11 31  1 3 i        2 1 r  2 1 i  2 2 r  2 2 i  2 3 r  2 3 i  
49.  will be compiled  For this reason  combine related  procedures in the same file in order to minimize the compiling of procedures not  needed by your program  Do not combine unrelated functions in one   src file   because if one function ina   src file is needed  the whole file will be compiled     user Library    This is a library for user created procedures  If the autoloader is ON  the user library is  the first place GAUSS looks when trying to resolve symbol references     You can update the user library with the 1ib command   lib user myfile src   This will update the user library by adding a reference to myfile src     No user library is shipped with GAUSS  It will be created the first time you use the  1ib command     For details of the parameters available with the Lib command  see the GAUSS  Language Reference     Using GAUSS for Windows95     g Files    If autoload and autodelete are ON and a symbol is not found in a library  the  autoloader will assume it is a procedure and look for a file that has the same name as  the symbol and a   y extension  For example  if you have defined a procedure called  square  you could put the definition in a file called square   g in one of the  subdirectories listed in your src_path  If autodelete is OFF  the   g file must be  listed in an active library  for example  in the user library     Global Declaration Files    7 8    If your application makes use of several global variables  create a file containing  declare statements  Us
50.  yo  lt t0009   LESA AAN X lt     e     f053530UOO gt DOS3       BO TON SK A    Complex    WWW WWW CN  O on ook W       OOnN oa FWNH   O       O 000770 OA Ooo Q  OO ON DORWN   O    N S    T    A    OO X3AOUOACOoO2AROs     61  62  65  64  65  66  67  68  69          UQOWrFreanryv                     A     2  po  74  75  76  27  78  79  80  81  02  35  84  89  06  OF  88            U O                   x Sex qinaA dS    89  90  cal  92  9 5  94  95  96  if  98  99  00  01  02  03  04  09  06  Oy  08  09       O Ur Ae Ua O N   O         Y  nN    000 TT m                ANA AE         Fonts Appendix    Using GAUSS for Windows95    Reserved Words  Appendix       The following words are used for GAUSS intrinsic functions  You cannot use these  names for variables or procedures in your programs     abs    balance  band  bandchol    call   callexe  cdfbeta  cdfbvn    and    bandcholsol  bandltsol    bandrv    cdfchic  cdffc  cdfgam  cdfn    atan    bandsolpd  besselj    bessely    edfnc  cdfni  cdftc  edftci    atan2    break    cdftvn  cdir  ceil    cfft    B 1    Using GAUSS for Windows95    cffti  ChangeDir  chol  choldn  cholsol  cholup  chrs   cint    clear    date  dbcommit  dbconnect  dbdisconnect  dbopen    dbstrerror    ed  edit  editm  elg  eigh  eighv    elgv    fcheckerr    clearg  close  closeall  els  color  cols  colsf  comlog    compile    debug  declare  delete  det  detl  dfree    else  elseif  enable  end  endfor  endif    endo    fgetsat    complex  con   conj  c
51. 2This is the label for X using Complex       font       ylabel     203This is the label for Y using Microb    EOQnE AY     Once a font is selected  all succeeding text will use that font until another font is  selected  If no fonts are selected by the user  a default font  Simplex  is loaded and  selected automatically for all text work    Greek and Mathematical Symbols    The following examples illustrate the use of the Simgrma font  they assume that  Simgrma was the fourth font loaded   For the available Simgrma characters and their  numbers  see Appendix A   The Simgrma characters are specified by either     1  The character number  preceded by a           2  The regular text character with the same number     For example  to get an integral sign    0    in Simgrma  embed either a      044    or a         in  the string that has been currently set to use Simgrma font     To produce the title f x    sin   Tx    use the following title string   title      201   x    sin 2    204p 201x              The    p     character 112  corresponds to TT in Simgrma     13 11    Using GAUSS for Windows95    To number the major X axis tick marks with multiples of 7 4  the following could be  passed to asclabel     lab       2010  204p 201 4  204p 201 2 3 204p 201 4        204p    asclabel  lab  0    xtics 0 pi pi 4 1    xtics is used to make sure that major tick marks are placed in the appropriate places   This example will number the X axis tick marks with the labels u   u Hyi  u  and  U
52. 5   circle in inches     M  3  x center of circle     M  4  y center of circle     M  5  radius     M  6  starting point of arc in radians     M  7  ending point of arc in radians     6   radius in plot coordinates     M  3  x center of circle     M 4  ycenter of circle      M 5  beginning point of radius in x plot units   0 is the center of the circle      M  6  ending point of radius    M  7  angle in radians     7   radius in inches    M  3  x center of circle    M  4  y center of circle      M 5  beginning point of radius  0 is the center  of the circle     M  6  ending point of radius    M  7  angle in radians   color  see    Colors     page 10 12     controls line thickness  This value may be zero or greater   A value of zero is normal line width     Mx9 matrix  Allows extra lines to be added to an xyz or surface  graph in 3 D plot coordinates      M 1    M  2    M  3    M  4    M  5    M  6    M  7     x starting point    y starting point    z starting point    x ending point    y ending point    z ending point    color  see    Colors     page 10 12     _plotshf    _plotsiz    _pltype    Publication Quality Graphics     M  8  line type     1 dashed   2 dotted   3 short dashes   4 closely spaced dots  5 dots and dashes    6 solid   M  9  line thickness  0   normal width      M 10  hidden line flag  1   obscured by surface  0   not  obscured     2x1 vector  distance of plot from lower left corner of output page in  inches      1  x distance    2  y distance   If scalar 0
53. AUSS has a  fast interpreter  and the binary compiled code is compact and efficient  Second  and  most significantly  GAUSS is a matrix language  It is designed to tackle problems that  can be solved in terms of matrix or vector equations  Much of the time lost in  interpreting the pseudocode is made up in the matrix or vector operations     This chapter will enable you to understand the distinction between    compile time    and     execution time     two very different stages in the life of aGAUSS program     Expressions    An expression is a matrix  string  constant  function reference  procedure reference  or  any combination of these joined by operators  An expression returns a result that can  be assigned to a variable with the assignment operator             4 1    Using GAUSS for Windows95    Statements    A statement is a complete expression or a command  Statements end with a  semicolon     y   x 3     If an expression has no assignment operator      it will be assumed to be an implicit  print statement     print x 3   or    x 3     Here is an example of a statement that is a command rather than an expression     output on     Commands cannot be used as a part of an expression   There can be multiple statements on the same line as long as each statement is  terminated with a semicolon    Executable Statements    Executable statements are statements that can be    executed    over and over during the  execution phase ofa GAUSS program  execution time   As an executab
54. Arrays of Matrices and Strings     oooonnnccicnnnnnniccnnnnonncncnnncannn cnn nan n nr naar rra 4 31  Atrays of Procedure rl cee ee  4 32  OP erator as cases sodas enaa aa Sacer ne cdi nee wn Based weve snc bos ce eee sev eee neueteeuetieetreeweees 5 1  Element by Element Operators    coccccconnncccccnnncononcnnonnnnnnnnnnn conc nr rra n nn rr rn rra 5 1  Matrix Opera OS a este  ee eee ad ee A cet a E ee 5 4  Numeric  Operators  daria a el ola ld im oath tal he occa bhatt 5 4  Other Matrix Operators     c20s   2 eens necesa 5 7  Relational Operators iii A neice eet 5 8  Logical Operators drenerer eevee ese ea reunite se dee Ae hear  5 11  Other Operators nani a n A aaa ae ieee a 5 13  Assignment  Operator  23 200  a poeta ial Hd ae 5 13  COMM dol e de do ee a eR Oe es TTE 5 13  POllOG itz titties ciate  oh Bae  Gia ide en een N ae EN 5 14  SPACE int ties ee es eee Sil te es Ae E E ne kiamsen E raes 5 14  A cat Sate E Lab E cL Roc StACRL LL Laue to OES tlhe 5 14  AID Orsan ciao ai A a a T aa T EAE T E PARN 5 14  Siring Concatenation e e ese ee ee eet CA 5 14  String Array Concatenation                ccccccceccccceceeeeeeeeeeeeeceaeeeceeeeeceeeseesennesaeeeeeeeeetes 5 15    String Variable Substitution anapeana a a aa ieis 5 16  Using Dot Operators with Constants                  cccccceceeeeeeeeeecenceececeeeeeeeseeeneneeeeeeeeeeeeeteeees 5 17  Operator Precedentes ado 5 18    Procedures and    IKCY WOLGS iii A a 6 1  Defining a Procedure mx c   6 2  Procedure Declaration a i
55. Diada 3 23  Language Fundamentals    4 1  EXPreSSIONS ii da cai A a 4 1  Statements an o ae PR ee E OUR AEE RE RP Se Ae OR 4 2  Executable  Statements a a a eel tia 4 2  Nonexecutable Statements a a a a a aaa 4 2  Program A ee pe ee elt 4 3  Main  SCO a EA ies ts OE ae ee ek dete Ihe AA AY ee ea 4 3  Secondary Sections ti A A A 4 4  Compiler Directives  00 ados 4 4    Contents    Using GAUSS for Windows95    POCO US e ld aid 4 6  Data  TYPOS vice rar tn keene 4 7  COnStants inches eth secret EE ch att E geen Sans A E T 4 7  MatriC S  sisi dr da ieee eds asedio 4 8  Strings  and Sting ANayS ice dit dilata 4 14  Character Matrices ui aed iene a ei ol 4 18  Special Data Types sine ce hi ee ee ed ees 4 19  Operator Precedentes alo ted 4 21  FloWw Control   cooio red estes At a Boke cd etc a a e dal do Nat 4 22  LOOPING asi A A nena Anarene taints 4 23  ConditionaliBranGhing hint  shes al a e ate taka   4 26  Unconditional BranChing      coooniionoccononnncnncnncnonanonananonnnnnnnnnononcnnnn non sereas P Eakad 4 27  FUNCION A A ae i ee A ee 4 28  Rules ES Md td dd d   4 28  MAME Si AS ein ee de ne es 4 28  CAMA A ee T eos e o e 4 29  Comment aeiiaaie ee ee Ne ee ea oes 4 29  ExtranGous  Spaces sucio ater dee ade sees tia es 4 29  Symbol Name Sua tecedeira Sa edd ned idan ane ees 4 29  Lado us e dd eddie dde 4 29  Assignment Statements     oooonnocccicnoconoccnnononncconananrnnnnnnnn cnn rn naar rn 4 30  Function Arguments coctel 4 30  Indexing Matrices cnie Hen ee a a t  o 4 30  
56. Extended Data Set v89  dat  Obsolete  use v96    dht  Data Set v92  dat Obsolete  use v96   Universal Data Set v96  dat Supported for read write     Small Matrix v89  Obsolete     Matrix files are binary files  and cannot be read with a text editor  They are created  with save  Matrix files with up to 8190 elements have a   fmt extension and a 16   byte header formatted as follows     Offset Description       0 1 DDDD hex  identification flag   2 3 rows  unsigned 2 byte integer   4 5 columns  unsigned 2 byte integer   6 7 size of file minus 16 byte header  unsigned 2 byte integer   8 9 type of file  0086 hex for real matrices  8086 hex for complex matrices    10 15 reserved  all 0   s    The body of the file starts at offset 16 and consists of IEEE format double precision  floating point numbers or character elements of up to 8 characters  Character elements  take up 8 bytes and are padded on the right with zeros  The size of the body of the file    9 12    File I O    is 8 rows cols rounded up to the next 16 byte paragraph boundary  Numbers are  stored row by row  A 2x3 real matrix will be stored on disk in the following way  from  the lowest addressed element to the highest addressed element      1 1   1 2   1 3   2 1   2 2   2 3           For complex matrices  the size of the body of the file is 16 rows cols  The entire real  part of the matrix is stored first  then the entire imaginary part  A 2x3 complex matrix  will be stored on disk in the following way  from the lowes
57. File already open    G0129 File not open for read    G0130 No output variables specified    G0131 Can t create file  too many variables    G0132 Can t write  disk probably full    G0133 Function too long    G0134 Can t seekr in this type of file    G0135 Can t seek to negative row    G0136 Too many arguments or misplaced assignment op       You have an assignment operator     where you want a comparison operator        or you have too many arguments     G0137 Negative argument   erf or erfc    G0138 User keyword must have one argument    15 11    Using GAUSS for Windows95    15 12    G0139 Negative parameter   Incomplete Beta    G0140 Invalid second parameter   Incomplete Beta    G0141 Invalid third parameter   Incomplete Beta    G0142 Nonpositive parameter   gamma    G0143 NaN or missing value   cdfchic    G0144 Negative parameter   cdfchic    G0145 Second parameter  lt  1 0   cdfchic    G0146 Parameter too large   Incomplete Beta    G0147 Bad argument to trig function    G0148 Angle too large to trig function    G0149 Matrices not conformable    For a description of the function or operator being used and conformability  rules  see    Matrix Operators     page 5 4  or the GAUSS Language Reference     G0150 Matrix not square    G0151 Sort failure    G0152 Variable not initialized    You have referenced a variable that has not been initialized to any value     G0153 Unsuccessful close on auxiliary output    The disk may be full     Error Messages    G0154 Illegal redefinition
58. GAUSS ss winaon    User Guide       Aptech Systems  Inc     Mathematical and Statistical System    Table of Contents    Table of  Contents eae  tt eek at ate ar eae et aed a a a te he i  Introduction  aia 1 1  Pr UCLA Sa 1 1  Documentation Convention Ssns r eee a a nono ocn nnnn cra nn nan nn nn aran es 1 2  Getting Started  a 2 1  Machine Requirement                 c cccccececececeeeeeeeeeeeeeenecesanananaaeaeaeeaeaaaeseeeeeseeeseeeeeeeeeneneneees 2 1  RE A i cS el Ek i 2 1  System Configuratie izae a nn cnn n nan nn rc nn O A aSa 2 3  Using the Windows Interface         ccccceseeeeeseseeeeeeseeeeeeeeeeeeeeeeeeeeseeeeeeeeeeneeeseeeseeeeeeenseeeaees 3 1  Operating  Modest atada 3 1  Selecting the Operating Mode      ooooccciccnconocnoconcccnnnnccnnonnnnnonnonnnnnnnnnnncnnannnnnnnnnncnnnnnnn 3 1  Interactive  Mode  iN ae re Re Re 3 2  Batch Mode iiscc  si fice  di ol edness da 3 3  GAUSS  WindOWS ie tee cece dalt 3 3  MERU Baryard a e aR da el ee ie Pad em hatte 3 4  Ele Ment a er re ne de OS SA RB SEES Oe AD A eee AER E 3 5  Edit Menin ne a dle 3 6  Search MEME EEE E ETE E A ES EET ca dade AN A ld toi 3 8  Mode MenU ut a e as tie  OA tale 3 9  Debug Men  aa a A oie eh ae 3 10  7 AX   1416  Md ias 3 11  Graph Menlisnanios donar br os A eee eas 3 14  Configure Men Beaks eal epee ded ste ee se aai 3 15  Windows  Ma Mae Salas eae sen a oe dh es 3 18  Help A cil eee hieui doen E Dass aod Reel ebb peat deed aad 3 19  NOOID AR tania dais iaa 3 19  Status Barinitas td a tt o a rd a 
59. LIST is a library symbol listing utility  It is a stand alone program that lists the  symbols available to the GAUSS autoloading system     LIBLIST will also perform   g file conversion and listing operations    g files are  specific files once used in older versions of GAUSS  Due to compiler efficiency and  other reasons    g files are no longer recommended for use  The LIBLIST options  related to   g files are supplied to aid the user in consolidating   g files and converting  them to the standard   src files     The format for using LIBLIST is   liblist  flags libl lib2     libn    flags control flags to specify the operation of liblist   G list all   y files in the current directory and along the src_path   D create gfile 1lst using all   y files in the current directory and along    the src_path     14 15    Using GAUSS for Windows95    iy 2 Oa    convert  g files to   src files and list the files in srcfile lst     list the contents of the specified libraries     list library names     use page breaks and form feed characters     The search is performed in the following manner     l     List all symbols available as   g files in the current directory and then the    src_path     2  List all symbols defined in  1cg files in the Lib_path subdirectory     gauss 1cg  if it exists  will be listed last     Report Format    14 16    The listing produced will go to the standard output  The order the symbols will be  listed in is the same order they will be found by GAUSS  excep
60. O mode  the output appears  in the Output window  To toggle between the current input and the Output window   use the Toggle Input Output Window command    Insert GAUSS Prompt    You use the Insert GAUSS Prompt command to manually add the GAUSS prompt at  the cursor position  The GAUSS prompt      is automatically displayed following the  execution of GAUSS code     Toolbar Shortcut     Keyboard Shortcut  Shift F2    Using the Windows Interface    Run Main File  You use the Run Main File command to run the specified main file     While running  output is displayed beneath the current block of GAUSS code if the  output mode is set to Cmnd or in the Output Window if the output mode is set to Split  T O     Toolbar Shortcut   Keyboard Shortcut  F2    Translate Dataloop Commands    You use the Translate Dataloop Command to convert dataloop commands to  commands GAUSS can understand and manipulate  You only run this command when  dataloop commands are used in the source code  Using it when it is not needed does  not alter the source code but the increased processing overhead can increase the time  to compile your program     Edit Main Flle    You use the Edit Main File command to open an editor window for the specified main  file  The file is loaded  if needed  and the Edit window becomes the active window     Toolbar Shortcut     Compile Main File    You use the Compile Main File command to compile the specified main file  During  compilation  any errors are displayed beneath the
61. Windows95    Documentation Conventions  The following table describes how text formatting is used to identify GAUSS    1 2    programming elements        Text Style Use Example   regular text narrative    text formatting is used        bold text emphasis     not supported under UNIX    italic text variables        Ifvnames is a string or has    monospace    monospace bold    code example    Refers to a GAUSS  programming element  within a narrative  paragraph     fewer elements than x has  columns  it will be          if scalerr cm    cm   inv x    endif            as explained under  create          Getting Started    This chapter covers installing GAUSS     Read any read     files  They contain information that was unavailable when this  manual was printed     Machine Requirements  e IBM AT PS 2 or compatible   e 386 CPU  with 387 math coprocessor  or higher   e Windows 95  98  NT 4 0  or 2000   e Minimum memory requirments   Windows 95 98   24 MB  Windows NT 4 0   40 MB  Windows 2000   72 MB    2 1    Using GAUSS for Windows95    Installation    Insert the GAUSS 3 5 disk into your CDROM drive and setup should start  automatically  If setup does not start automatically  use the run command to execute  setup exe in the root directory of the GAUSS 3 5 disk     You can use setup for initial product installation and for additions or modifications to  GAUSS components     2 2    Using the  Windows Interface    Welcome to GAUSS     This new GAUSS Windows interface consists of a m
62. a 6 3  Local Variable Declarations                    cccccceceeeeeeeeteeeeeeeceeeeeeeeeeeeeeeeeeeeeeeeeeaeaeaeaeaaaaaae 6 3  Body Of Procedure acasin a e A a ea eee 6 4  Returning from the Procedure   ocooccccccccoccccccnoonccnnconnnnnncnnnonnnnnnno nan nnncnnnnnnnccnnnanannnnnnnns 6 4  End of Procedure DefinitiON      ooooooooocccnnnnnccninnnccconooncnccnnonnnnnccnnonnn nn nncnnnnnncnninnnnnnnnnnno 6 5  Calling a Procedure uds 6 5  ROW ti AA A ees oa AA eae 6 6  Defining a KeyWord  tdci 6 6  Calling a Key WOrd oss ies eiciibess ocd litres 6 7  Passing Procedures to Procedures             c ccccccseceseecsseeenseteenectttessoneseueeenanestaespeeeereneeee 6 8  Indexing Procedur  s   20  nancies aie e N We eae 6 9  Multiple Returns from Procedures                  cccceecceceeeeceeeeeeteeceeneecaeeeeeeeeeeeeessenencaeeeeeeeeees 6 10  Saving Compiled Procedures               cccccccssececeeeeeeeeeeeeeeneeeceetnneneeeretnneaeeeesnneaaeenennneeeees 6 12  LN PANIES da 7 1  A ati aired a al Paden eT a E ia 7 1  Forward  Referentes zr cians wees tee Seiwa eames 7 1  The Autoloader Search Path              cccccceceeceeeceeeeecceeceeeeeeeeeeeeeeenceeeaeeaeeeeeeeeeeteeeeeneeses 7 2  Global  Declaration  Files iio  icncttvcti ck e erat Shaheed bh dh NG hoe bad 7 8  Troubleshooting mitico aa 7 11  Using dec Fleitas ed eee ee 7 12  CoOMPilOF   ononinin nia ida a diners 8 1  Compiling Programista SEE 8 1  Compiling a File sesiyasida aA i ETEA E E 8 2  Saving the Current WorkSpace i s n a 
63. a aa e a a a 8 2  Debugging 1 a es ena do 8 2  Ele TO i   9 1  ASCII FIGS vomita a A 9 2  Matrix  Data iii e DE ti 9 3  General File I O aio a A ee A es 9 5    Contents    Using GAUSS for Windows95    Data Sets eaea nits R   9 6  LOU irc 9 6  Creating Data  Sets iii tddi 9 7  Reading and  Writing iii as 9 7  Distinguishing Character and Numeric Data     oooonoocccccncoccccccnconnccnonannnnccnannnncncnnnnno 9 9   O ae 9 11   File Formats 0  ctacci al etl ai tias od e a o a Madd de tl G 9 11  Small Matrix v89  Obsolete      ooonnoicccnnnnnnccinnnnocccccnnnnonccnnanann nn cnn narrar rra 9 12  Extended Matrix v89  Obsolete      oooonooncccninnoccccccnononccccononncccncnononcncnonannnncnnnannncninnnns 9 13  Small String v89  Obso0lete     oooooonionicnonocccinnncccccnncnnnononconnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnanannns 9 13  Extended String v89  Obsolete jacens ARAARA 9 14  Small Data Set v89  Obsolete     ooocoocnnnncccnnonncccccnnnnconcccnanonrnccnnr nn cnn rar nr 9 14  Extended Data Set v89  Obsolete    oooooooccinnnncccconnooccccconnoncncccnonancncnonannnccnnnanancncninns 9 16  Matrix v92   Obsolete  oa aeia aeee aE ERE E EE EEE aaa  9 16  string  VIZ  Obsolete   iii a a tt nen 9 17  Data Set v92  Obsolete  J aieri rE Enee rE EE EAT R EAEAN ERASE ASEA E a NE 9 18  Matrix VIG iia unites oe ete een E E NORE AOT a eee ee ae 9 19  Data  Set VOG at ia aa it tees 9 20    Foreign Language    tera ii inclina 10 1  Creating Dynamic LibrarieS                 cccccceeceeeeeeeeceeceeeeeeee
64. ab  tan  tempname    time    return  rev  rfft  rffti  rfftip  rfftn  rfftnp  rfftp    shiftr  show  showpqg  sin   sleep  solpd  sorte  sortcc  sorthe  sorthcc    sortind    timeutc  trace  trap  trapchk    rndcon  rndmod  rndmult  rndn  rndns  rndseed  rndu    rndus    sortindc  sqrt  stdc  stocv  stof  stop  strindx  string  strlen  strrindx    strsect    trim  trimr    trunc    type    Reserved Words Appendix    rotater  round  rows  rowsf    run    submat  subscat  sumc  svdcusv  svds  svdusv  sysstate    system    typecv  typef    Using GAUSS for Windows95    union    uniqindx    vals  varget    vargetl    while   winclear  wincleararea  winclearttylog  winclose  wincloseall  winconvertpqg  wingetactive    wingetattributes    xor    Zeros    unique    until    varput  varputl  vartypef    wingetcolorcells  wingetcursor  winmove  winopenpqg  winopentext  winopentty  winpan   winprint    winprintpqg    xpnd    upper    use    vec  vech    vecr    winrefresh  winrefresharea  winresize    winsetactive    winsetbackground    winsetcolor  winsetcolorcells  winsetcolormap    winsetcursor    utctodtv    utrisol    vfor    winsetforeground  winsetrefresh  winsettextwrap  winwrite  winzoompqg    writer    Singularity Tolerance  Appendix       The tolerance used to determine whether or not a matrix is singular can be changed   The default value is 1 0e 14 for both the LU and the Cholesky decompositions  The  tolerance for each decomposition can be changed separately  The following
65. ace    Clear to End    You use the Clear to End command to delete all text from the GAUSS prompt to the  end of text     Toolbar Shortcut  x    Keyboard Shortcut  F7    Select Text Blocking Mode    You use the Text Blocking Mode to select all text from the first character to the last  character when using the mouse or Shift key  Two other types of blocking are also  supported     e Character Blocks This selects all text from the first character to the last  character       Line Blocks This selects entire lines     e Column Blocks This selects the text that is located within the rectangle whose  opposite corners are defined by the first and last character you select  This option  is not enabled if a proportional font is used     The mode selected applies to all open documents  However  since column block mode  is not supported for documents with proportional fonts  line block mode is used when  such a document has the focus  Column blocks usually work better when the expand  tabs option is enabled     All blocks can be manipulated using the edit keys    cut  copy  paste  and delete   Blocks can also be moved by dragging the selected block with the mouse  and can be  copied by pressing and holding down CTRL while dragging the selected block with  the mouse     Toolbar Shortcut     Character Blocking Mode    Line Blocking Mode    Column Blocking Mode    Using GAUSS for Windows95    3 34    Find Replace    You use the Find Replace command to find the specified text in the active 
66. ackets   y   x 3 5    and to separate arguments of functions within parentheses     y   momentd x d      5 13    Using GAUSS for Windows95    Period    Space    Colon    Dots are used in brackets to signify    all rows    or    all columns        Spaces are used inside of index brackets to separate indices     Y   sel 3  5Sy3  0 915    No extraneous spaces are allowed immediately before or after the comma  or  immediately after the left bracket or before the right bracket     Spaces are also used in print and lprint statements to separate the separate  expressions to be printed     print x 2 2 sqrt  x      No extraneous spaces are allowed within expressions in print or lprint  statements unless the expression is enclosed in parentheses     print  x   2   2   sqrt  x       A colon is used within brackets to create a continuous range of indices     y   x 1 5        Ampersand    The ampersand operator   amp   will return a pointer to a procedure  proc  or function     n   It is used when passing procedures or functions to other functions and for  indexing procedures   For more information  see    Indexing Procedures     page 6 9      String Concatenation    x      dog      y      cat      z   x Sty     print 2     dogcat    Operators    If the first argument is of type string  the result will be of type string  If the first  argument is of type matrix  the result will be of type matrix  Here are some examples     y   0       caterpillar      the result will be a 1X1 matrix conta
67. added if the named procedure exists in the GAUSS  workspace     Line breakpoints can be toggled using the Tool Bar icon    Clear All Breakpoints    You use the Clear All Breakpoints to remove all line and procedure breakpoints from  all open files     Breakpoints usually remain valid when a file is changed and lines are inserted or  deleted but are lost when a file is closed  whether it is saved or not     The debugger displays the lines where your program will stop executing and wait for  user input  Line breakpoint are displayed with a red highlight     Procedure breakpoints occur at the beginning of a procedure  and are not highlighted   Procedure breakpoints can only be added if the named procedure exists in the GAUSS  workspace     Toolbar Shortcut     Action Menu    You use the Action menu to access the various run commands and open the  Matrix editor and DOS windows  The Action menu contains the following  entries     Using the Windows Interface    Run Command    The Run command allows you to run the code you have entered  a block of code you  selected  or the active file  depending on the operating mode  The following entries  appear on the Action menu of the respective windows     Command window    Run Commands runs the commands you enter in the Command window   Run Marked Block runs the text you selected in the Command window     Edit window    Run Current File runs the active file   Run Marked Block runs the text you selected in the Edit window     Output window   
68. arch for it in the active libraries  If it is found  the file containing it  will be compiled  If it is not found in a library  the autoload autodelete state will  determine how it is handled     The Autoloader Search Path    7 2    If the autoloader is OFF  no forward references are allowed  Every procedure  matrix   and string referenced by your program must be defined before it is referenced  An  external statement can be used above the first reference to a symbol  but the  definition of the symbol must be in the main file or in one of the files that are   include   d  No global symbols are deleted automatically     Libraries    If the autoloader is ON  GAUSS searches for unresolved symbol references during  compilation using a specific search path  If the autoloader is OFF  an Undefined  symbol error message will result for right hand side references to unknown symbols     When autoload is ON  the autodelete state controls the handling of references to  unknown symbols     The following search path will be followed to locate any symbols not previously  defined     Autodelete ON    1  user library   2  user specified libraries   3  gauss library   4  current directory  then src_path for files with a   y extension    Forward references are allowed and   g files need not be in a library  If there are  symbols that cannot be found in any of the places listed above  an Undefined  symbol error message will be generated and all uninitialized variables and all  procedures with gl
69. are normally set prior to running the debugger but can also be set or  cleared for the current file by using the Toggle Breakpoint command  Breakpoints set  with the Set Clear Breakpoint command are temporary and are lost after the current  debug run     Toolbar Shortcut   Keyboard Shortcut  Ctrl T    Using the Windows Interface    Watch Variables allow you to see how variables change in value while a program is  running  The values appear in a Matrix Editor  Watch variables can be specified prior  to running the debugger or during a debugging session  A watch variable can be the  name of a matrix  a scalar  a string array or a string  For a matrix or a string array  the  first element is displayed     The debugger searches for a watch variable using the following precedence     A local variable within a currently executed procedure   e A local variable within a currently active procedure       A global variable     Toolbar Shortcut   Keyboard Shortcut  Ctrl W    Using GAUSS for Windows95    3 44    Language  Fundamentals    GAUSS is a compiled language  GAUSS is also an interpreter  A compiled language   because GAUSS scans the entire program once and translates it into a binary code  before it starts to execute the program  An interpreter  becauses the binary code is not  the native code of the CPU  When GAUSS executes the binary pseudocode  it must     interpret    each instruction for the computer     How can GAUSS be so fast if it is an interpreter  Two reasons  First  G
70. arrow 13 13  _parrow3 13 14  _paxes 13 15   _paxht 13 15   _pbartyp 13 15  _pbarwid 13 15    _pbox 13 16  _pboxctl 13 16  _pboxlim 13 16  _pcolor 13 17  _pcrop 13 17  _pcross 13 17  _pdate 13 17  _perrbar 13 17  _pframe 13 18  _pgrid 13 18  _plctrl 13 18  _plectrl 13 19  _plegstr 13 19  _plev 13 19  _pline 13 20  _pline3d 13 22  _plotshf 13 22  _plotsiz 13 22  _pltype 13 23  _plwidth 13 23  _pmcolor 13 23  _pmsgctl 13 23  _pmsgstr 13 24  _pnotify 13 24  _pnum 13 24  _pnumht 13 24  _protate 13 24  _pscreen 13 25  _psilent 13 25  _pstype 13 25  _psurf 13 25  _psym 13 25  _psym3d 13 25  _psymsiz 13 26  _ptek 13 26  _pticout 13 26  _ptitlht 13 26  _pversno 13 26  _pxmem 13 26  _pxpmax 13 26  _pxsci 13 26  _pypmax 13 26  _pysci 13 26  _pzclr 13 26  _pzoom 13 26  _pzpmax 13 27  _pzsci 13 27    Index    Index 1    Using GAUSS for Windows95    A       ampersand 5 14   and 5 11  5 12   and 5 13   append 14 3   append  atog command 14 1  arguments 4 30  6 2  6 3  arrows 13 13   ASCII files 9 2  14 1  ASCII files  reading 9 3  ASCII files  writing 9 3  asclabel 13 9   assignment operator 4 2  4 30  5 13  atog 9 3  14 1   autoloader 7 1  14 19  auxiliary output 9 3   axes 13 2   axes numbering 13 2    B       bar 13 1   bar shading 13 15   bar width 13 15  begwind 13 5  13 7  blank lines 4 29  Boolean operations 5 11  box 13 1    Cc       calling a procedure 6 5  caret 5 6  5 16  case 4 29  Cholesky decomposition 5 5  circles 13 4  13 17  13 20  code 12 2  colon 4 29  color 13 5  13 18  
71. as  y    A  D 2 G 2  6 2     and will result in a 2x2 matrix because the arithmetic operators have precedence over    concatenation     24  13    Language Fundamentals    For more information  see    Operator Precedence     page 4 21   The let command is used to initialize matrices with constant values     let x 2 2    1 2 3 4        Unlike the concatenation operators  it cannot be used to define matrices in terms of  expressions such as    y   x1 x2 x2 x3 3 x4     The statement  vores 1 35 58     will put the intersection of the first three rows and the fifth through eighth columns of  x into the matrix y     The statement  Y    BL 31 55  915    will create a 3x3 matrix y with the intersection of the specified rows and columns  pulled from x  in the indicated order      The statement  let r  13 m1     let c    5s   y   x r cl   will have the same effect as the previous example  but is more general   The statement   y  2 4    3     will set the 2 4 element of the existing matrix y to 3  This statement is illegal if y does  not have at least 2 rows and 4 columns     The statement  x   con 3 2      will cause a   to be printed in the window  and will prompt the user until six numbers  have been entered from the keyboard     The statement    load x     b mydata asc    Using GAUSS for Windows95    will load data contained in an ASCII file into an Nx1 vector x   Use rows  x  to find  out how many numbers were loaded  and use reshape x N K  to reshape it to an  NxK matrix      The 
72. at is flush left  The drive and path can be included  to speed up the autoloader  Indented below the filename are the symbols included in  the file  There can be multiple symbols listed on a line  with spaces between  The  symbol type follows the symbol name  with a colon delimiting it from the symbol  name  The valid symbol types are     fn user defined single line function  keyword keyword   proc procedure   matrix matrix  numeric or character  string string    7 5    Using GAUSS for Windows95    If the symbol type is missing  the colon must not be present and the symbol type is  assumed to be proc  Both of the following library files are valid     Example 1           math       This library lists files       mathematical routines     norm sre  onenorm  Proc infnorm proc    complex src    and procedures for       Enorm proc    cmmult  proc cmdiv proc cmadd proc cmsoln proc    poly src    polychar proc polyroot proc polymult proc    Example 2             math       This library lists files and procedures for       mathematical routines     c  gauss srce norm src    onenorm   proc  infnorm   proc  Enorm   proc       Libraries    c  gauss src complex src    cmmult   proc  cmdiv   proc  cmadd   proc  cmsoln   proc    c  gauss src fcomp srec  feg   proc  fne   proc    flt   proc       fgt   proc  LS proc  fge   proc    c  gauss src fcomp dec    _fcmptol   matrix    Once the autoloader finds  via the library  the file containing your procedure  definition  everything in that file
73. c  9 VARO5 numeric  10 VARO6 numeric  11 VARO7 numeric  12 VARO8 numeric    outvar is not used with packed ASCII files     preservecase    Optional  preserves the case of variable names  The default is nopreservecase   which will force variable names for numeric variables to upper case and character  variables to lower case     Utilities    Examples  The first example is a soft delimited ASCH file called agex1 asc   The file contains seven columns of ASCII data   Jan 167 3 822 4 6 34E06 yes 84 3 100 4  Feb 165 8 987 3 5 63E06 no 22 4 65 6  Mar 165 3 842 3 7 34E06 yes 65 4 78 3  The atog command file is agex1  cmd   input c  gauss agexl asc   output agexl   invar Smonth  temp pres vol  true var 02      outvar month true temp pres vol     The output data set will contain the following information                 name month true TEMP PRES VOL  case 1 Jan yes 167 3 822 4 6 34e 6  case2   Feb no 165 8 987 3 5 63e 6  case3   Mar yes 165 3 842 3 7 34e 6  type char char numeric numeric numeric          The data set is double precision since character data is explicitly specified   The second example is a packed ASCII file called xlod asc     The file contains 32 character records     AEGDRFCSTy02345678960631567890 lt CR gt  lt LF gt   EDJTAJPSTn12395863998064839561 lt CR gt  lt LF gt   GWDNADMSTy19827845659725234451 lt CR gt  lt LF gt           1      position 1 10 20 30 31 32    14 11    Using GAUSS for Windows95    The atog command file is x lod  cmd   input c  gauss dat xlod asc  
74. cannot be zero    You cannot reshape a matrix to a size of zero     vargetl outside of procedure    varputl outside of procedure    File handle must be an integer    Error renaming file    Error reading file    15 7    Using GAUSS for Windows95    15 8    G0083 Error creating temporary file  G0084 Too many locals  A procedure has too many local variables     G0085 Invalid file type    You cannot use this kind of file in this way     G0086 Error deleting file    G0087 Couldn t open    The auxiliary output file could not be opened  Check the file name and make  sure there is room on the disk     G0088 Not enough memory to convert the whole string  G0089 WARNING  duplicate definition of local  G0090 Label undefined    Label referenced has no definition     G0091 Symbol too long    Symbols can be no longer than 8 characters     G0092 Open comment    A comment was never closed     G0093 Locate off screen    G0094 Argument out of range    G0095 Seed out of range    G0096 Error parsing string    parse encountered a token that was too long     Error Messages    G0097 String not closed    A string must have double quotes at both ends     G0098 Invalid character for imaginary part of complex    number    G0099 Illegal redefinition of user keyword    G0100 Internal ERROR        Notify Aptech Systems     G0101 Argument cannot be zero    The argument to 1n or log cannot be zero     G0102 Subroutine calls too deep    Too many levels of gosub  Restructure your program     G0103 return witho
75. carding newlines   Define output format for matrices  string arrays  and strings   Write strings to a file    Write strings to a file  appending newlines    Initialize matrices  strings  and string arrays    Load a string or string array file    fst file     Print expressions to the printer    Print global symbol table to the printer     Using GAUSS for Windows95    print Print expressions in window and or auxiliary output    reshape Reshape a matrix or string array to new dimensions    save Save matrix  string array  string  procedure  function  or keyword to  disk and give the disk file either a   fmt    fst  or   fcg extension    show Display global symbol table    sortcc Quick sort rows of matrix or string array based on character column    type Indicate whether variable passed as argument is matrix  string  or  string array    typecv Indicate whether variables named in argument are strings  string  arrays  matrices  procedures  functions  or keywords    varget Access the global variable named by a string array    varput Assign the global variable named by a string array    vec Stack columns of a matrix or string array to form a column vector    vecr Stack rows of a matrix or string array to form a column vector     String arrays are created through the use of the string array concatenation operators   Below is a contrast of the horizontal string and horizontal string array concatenation  operators     x      age      y      pay      n      sex        S x    y S  n     sa
76. cedence of the  operators involved and the order in which they are used  For example  the   and    operators have a higher precedence than the   and     operators  In expressions that  contain the above operators  the operand pairs associated with the   or   operator are  evaluated first  Whether   or   is evaluated first depends on which comes first in the  particular expression     The expression     5 3 4 6 3  is evaluated as      5   3 4   6 3     Within a term  operators of equal precedence are evaluated from left to right     Operators    The precedence of all operators  from the highest to the lowest  is listed in the  following table        Operator Precedence    Operator Precedence   Operator Precedence  re 90    2 65  2 55  i 90     65    55    89   lt  65  lt  55  zs 85  S 65  lt  55  A 85    65    55   unary      83   gt  65  gt  55    80 2 65 2 55  ko 80  eq 65 eq 55     80  ge 65 ge 55  E 80  gt 65 gt 55  80  le 65 le 55    80  1t 65 lt 55    75  ne 65 ne 55     70  not 64 not 49    70  and 63 and 48    70  or 62 or 47    68  KOr 61 xor 46    67  eqv 60 eqv 45       65     55  space  35     lt  65   lt  55   35     lt  65   lt  55   10       65     55      gt  65   gt  55                5 19    Procedures and  Keywords    Procedures are multiple line  recursive functions that can have either local or global  variables  Procedures allow a large computing task to be written as a collection of  smaller tasks  These smaller tasks are easier to work with and keep the
77. cks  the actual commands are added  This  provides a complete history of all commands executed  The default is selected     The Prompt on Exit option determines whether a prompt to verify exit is given on an  exit condition  The default is unselected     The  Enter behavior  control defines the behavior of the Enter key when pressed in the  Command window  The following choices are available       Enter does not execute  When selected  pressing  lt Enter gt  starts a new line like in  most word processors  GAUSS execution occurs using Ctrl F2 or clicking the  Execute GAUSS button       Enter executes if no     If the current line ends with a semicolon  pressing  lt Enter gt   starts a new line  If the current line does not end with a semicolon  the code from  the cursor back to the previous GAUSS prompt will be executed       Enter always executes  The current line will be executed whether or not the line  ends with a semicolon  This is the default  You can toggle between Enter does not  execute and Enter Executes if no         by clicking Enter Ex on the Status bar     The Active becomes main option specifies that when an active file is executed  it  becomes the main file after execution  You can also make an active file the main file  by using the Set Main File command on the Action menu  The default is selected     Using the Windows Interface    Tabs Tab    The Tab spacing characters option allows you to enter the number of spaces between  tab stops  The available values a
78. cy of the output file  Use of this command should be  dictated by the accuracy of the input data and storage space limitations  The format is     outtyp fmt   where fmt is    D or 8 double precision  F or 4 single precision  default     I or 2 integer       The ranges of the different formats are           Significant  Bytes Data Type Digits Range  2 integer 4    32768  lt  X  lt  32767  pne E 8 43x10 lt  X   lt 3 37x10  precision    ee 1 16 419x107  lt   x   lt  1 671079  precision    If the output type is integer  the input numbers will be truncated to integers  If your  data has more than 6 or 7 significant digits  specify outt yp as double     Character data require outtyp d  ATOG automatically selects double precision  when character data is specified in the invar statement  unless you have specified  nocheck     14 9    Using GAUSS for Windows95    14 10    The precision of the storage selected does not affect the accuracy of GAUSS  calculations using the data  GAUSS converts all data to double precision when the file  is read     outvar    Selects the variables to be placed in the GAUSS data set  The out var command  needs only the list of variables to be included in the output data set  They can be in any  order  For example     invar  name  age pay  sex  var 1 10  x 005      outvar sex age x001 x003 var 1 8      column name data type       1 sex character  2 AGE numeric  3 x001 numeric  4 x003 numeric  5 VARO1 numeric  6 VAR02 numeric  7 VARO3 numeric  8 VARO4 numeri
79. d E ated ehdeoel hits A 2  O anea ee A 3  Microp  drian toe hades dagen ed eee Sv ideal eee A 4  COMpleX ista dd o a AN a fas oe ana eM Mets Past tg A 5    Contents    Using GAUSS for Windows95    Reserved Words Appendix civic a B 1  Singularity Tolerance Appendix commocccccnnnocccccnnnanccnnnannnnc cnn nano cnn rra crac C 1  Reading and Setting the Tolerance    ooococococccccnccccccccocnnonnonnononnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnninnnanns C 2  Determining Singularity aaa ainiai aai aeina a cnn nn anno conc n nano A nn nro C 2  Md daa Index1    vi    Introduction    Product Overview    GAUSS is a complete analysis environment suitable for performing quick  calculations  complex analysis of millions of data points  or anything in  between  Whether you are new to computerized analysis or a seasoned  programmer  the GAUSS family of products combine to offer you an easy to  learn environment that is powerful and versatile enough for virtually any  numerical task  Since its introduction in 1984  GAUSS has been the standard  for serious number crunching and complex modeling of large scale data   Worldwide acceptance and use in government  industry  and the academic  community is a firm testament to its power and versatility  The GAUSS  System can be described several ways  It is an exceptionally efficient number  cruncher  a comprehensive programming language  and an interactive analysis  environment  GAUSS may be the only numerical tool you will ever need     1 1    Using GAUSS for 
80. d in the invar statement  and you have  specified nopreservecase     GAUSS does not make this distinction internally  It is up to the program to keep track  of and make use of the information recorded in the case of the variable names in a data  set     When creating a data set using the saved command  this convention can be  established as follows     data     M 32 21500   F 27 36000   F 28 19500   M 25 32000       dataset      mydata        T    vnames        sex    AGE PAY          call saved  data  dataset vnames      It is necessary to put    sex    in quotes in order to prevent it from being forced to  uppercase     The procedure getname can be used to retrieve the variable names     print  getname     mydata         The names are     sex    File I O    AGE       PAY    When writing or creating a data set  the case of the variable names is important  This  is especially true if the GAUSS applications programs will be used on the data set     Matrix Files    GAUSS matrix files are files created by the save command     The save command takes a matrix in memory  adds a header that contains  information on the number of rows and columns in the matrix  and stores it on disk   Numbers are stored in double precision just as they are in matrices in memory  These  files have the extension   fmt     Matrix files can be no larger than a single matrix  No variable names are associated  with matrix files     GAUSS matrix files can be load   ed into memory using the load or loadm  co
81. d the algorithms  you are using  GAUSS is shipped with maxvec set to 20000  maxvec is a procedure  defined in system  src that returns the value of the global scalar _ maxvec  The  value returned by a call to maxvec can be modified by editing system  dec and  changing the value of __maxvec  The value returned when running GAUSS Light is  always 8192     Complex numbers use twice the space of real numbers  so the optimum single disk  read size for complex data sets is half that for real data sets  You can set___maxvec  for real data sets  then use maxvec 2 when processing complex data sets  iscplxf  will tell you if a data set is complex    Hard Disk Maintenance    The hard disk used for the swap file should be optimized occasionally with a disk  optimizer  Use a disk maintenance program to ensure that the disk media is in good  shape    CPU Cache    There is a line for cache size in the gauss cfg file  Set it to the size of the CPU data  cache for your computer     This affects the choice of algorithms used for matrix multiply functions     This will not change the results you get  but it can radically affect performance for  large matrices     16 3    Fonts  Appendix       There are four fonts available in the Publication Quality Graphics System     Simplex standard sans serif font  Simgrma Simplex greek  math  Microb bold and boxy  Complex standard font with serif    The following tables show the characters available in each font and their ASCII  values   For details on sel
82. dow command to toggle between the Edit  window or Command window and the Output window     Keyboard Shortcut  F5    Toggle Cmnd Split  O Mode    You use the Toggle Cmnd Split I O Mode command to toggle between the Cmnd and  Split I O mode  In Cmnd mode  program output is displayed in the Command window  after the commands are executed     Using GAUSS for Windows95    In Split I O mode  program output is displayed separately in the Output window after  the commands are executed    Keyboard Shortcut  F6    Toggle Overstrike Insert Mode    You use the Toggle Overstrike Insert Mode command to toggle between typing over  the existing text or inserting space for the new text as you type  The default is insert  mode  When the overstrike mode is active  OVR is displayed on the status bar     Keyboard Shortcut  press the Insert key    Select Text Blocking Mode    You use the Select Text Blocking Mode to choose how you would like to select the  text when using the mouse or Shift key  The three types of blocking are     e Character Blocks This selects all text from the first character to the last  character       Line Blocks This selects entire lines       Column Blocks This selects text that is located within the rectangle whose  opposite corners are defined by the first and last character you select  This option  is not enabled if a proportional font is used     The mode selected applies to all open documents  However  since column block mode  is not supported for documents with propo
83. e  This is good for common exit routines     goto errout     Matrix singular         goto errout     File not found         Erroul   pop errmsg   errorlog errmsg     end     4 27    Using GAUSS for Windows95    gosub    With a gosub  the address of the gosub statement is remembered and when a  return statement is encountered  the program will resume executing at the  statement following the gosub     Parameters can be passed with a gosub in the same way as a goto  With a gosub  it  is also possible to return parameters with the return statement     Subroutines are not isolated from the rest of your program  and the variables referred  to between the label and the return statement can be accessed from other places in  your program     Since a subroutine is only an address marked by a label  there can be subroutines  inside procedures  The variables used in these subroutines are the same variables that  are known inside the procedure  They will not be unique to the subroutine  but they  may be locals that are unique to the procedure the subroutine is in   For details  see  gosub in the GAUSS Language Reference      Functions    Single line functions that return one item can be defined with the   n statement     fn area r    pi   r   r     These functions can be called in the same way as intrinsic functions  The above  function could be used in the following program sequence     diameter   3   radius   3   2     a   area radius      Rules of Syntax    This section lists the gene
84. e Select button  The default is off     The Sound at keyboard request option determines whether a sound is played when a  keystroke is required  for example if the GAUSS command key was issued  The  current sound can be tested using the Test button  and the sound file can be selected  using the Select button  The default is off     The Enter Behavior control specifies how ENTER is programmed in Interactive  mode  There are three possible choices       Pressing ENTER does not Execute  Under this option  pressing ENTER merely  starts a new line  This is the equivalent of typing in a word processor  GAUSS  execution occurs using F2 or the Execute GAUSS button     Using the Windows Interface      Pressing ENTER Executes if no          This is the default Behavior  If the current  line ends with a semicolon       ENTER merely starts a new line  If the current  line does not end with a semicolon       then a semicolon will be inserted at the  end of a line after ENTER has been pressed  and the code from the caret back to  the previous GAUSS prompt will be executed       Pressing ENTER always Executes  The current line will be executed  equivalent  to pressing F2   whether or not the line ends with a semicolon  This option sets the  default mode  it can be changed on the fly by clicking the Enter Ex panel on the  Status Bar     The Prompt to Save Untitled option determines whether or not a prompt is given on  exit querying saving files that have neither been loaded nor saved  and he
85. e debugger with a red highlight     Procedure breakpoints occur at the beginning of a procedure and can only be added if  the named procedure exists in the GAUSS workspace     Toolbar Shortcut     Main File List    You can reopen a file recently used by GAUSS by double clicking on the file name on  the File List on the Toolbar  The list contains up to ten of the most recent main files  used by GAUSS     Run Main File    You use the Run Main File command to run the specified main file     While running  output is displayed beneath the current block of GAUSS code if the  output mode is set to Cmnd or in the Output Window if the output mode is set to  Split T O     Toolbar Shortcut   Keyboard Shortcut  F2  Edit Main File    You use the Edit Main File command to open an editor window for the specified main  file  The file is loaded  if needed  and the Edit window becomes the active window     E   Toolbar Shortcut   Debug Main File    You use the Debug Main File command to run the main file in the Debug  window  Prior to running the debugger  breakpoints can be set or cleared in the    Using GAUSS for Windows95    active window at the cursor using the breakpoint set and clear commands   Watch variables can also be set prior to running the debugger     Compile Main File    You use the Compile Main File command to compile the specified main file  During  compilation  any errors are displayed beneath the current block of GAUSS code if the  output mode is set to Cmnd  or in the Output
86. e files with the extension   dec to assign default values to  global matrices and strings with declare statements  A file with a  ext extension  containing the same symbols in external statements can also be created and   include   d at the top of any file that references these global variables  An  appropriate library file should contain the name of the   dec files and the names of the  globals they declare     Here is an example that illustrates the way in which   dec   ext   1cg and  src  files work together  Always begin the names of global matrices or strings with    _    to  distinguish them from procedures      src File            fcomp src       These functions use _fcmptol to fuzz the comparison       operations to allow for roundoff error     k k      The statement  y   feq a b    k k   xx is equivalent to  y   a eq b   k k       Returns a scalar result  1  true  or 0  false     EX y   feq a b      Libraries    KE y   fne a b            include fcomp ext     proc feq a b    retp  abs  a b   lt  _fcmptol      endp     proc fne a b    retp  abs  a b   gt  _fcmptol      endp      dec File          xx  fcomp dec     global declaration file for fuzzy       xx comparisons        declare matrix _fcmptol    le 14    ext File      xx  fcomp ext     external declaration file for fuzzy    xx comparisons     xy    external matrix _fcmptol     Using GAUSS for Windows95    7 10     lcg File        xx  fcomp l1cg     fuzzy compare library    ay    fcomp dec  _fcmptol  matrix   fco
87. each GAUSS command     Toolbar Shortcut     Help on Help    You use the Help on Help command to get help on using the Windows and GAUSS  Help systems  The Help systems can be accessed using the following     e Click Help on the Menu bar and select the type of help you need     e Click the Help icon on the Toolbar to for information on GAUSS  commands     e Right click on any icon to get pop up help for the icon     e Click on any word to place the cursor in the word and press F1  If the word is a  GAUSS command  pop up help on that word is displayed  If the word is not a  GAUSS command  but is in an active library  the respective file will be displayed     Press Ctrl F1 while the cursor is in a word initiates the GAUSS source  browser  If the word is defined in an acative library  the respective file will be  loaded into an edit window     Toolbar    Using the Windows Interface    About Gauss    You use the About GAUSS command to display the GAUSS copyright and version  information     You use the Toolbar buttons for fast access to the most commonly used commands   Place the mouse pointer over the button to pop up a description of the command  Click  on the button to run the command  Right click on the button for more comprehensive  help     New File    You use the New command to open a new  untitled document in the Edit window   whichever is active     Note  New  unsaved documents are not automatically backed up until you save them   giving them a file name  After you save t
88. ecting fonts for your graph  see    Selecting Fonts     page 13   10     Using GAUSS for Windows95    Smplex    20    22  25  24  25  26       89    61    OO  oft  53  6    90    62  65  64  65  66  67  68  69    92  95  94  95  96  97  98  99    SA    00       02    03  04    QS  06    07    08  09             58  oo    70  71    72  2 3    74  75  76    77       78  79    50    80    52    ore   94    82    35    DO  56    84    35    Oey     86    58  S9    37     88    60    Simgrma    WN WWW CEN WG WG  O ON DOAK WG    MA EOI    x UD                         G00  Wey OE GR  SO    OJ 0000770700 ON A AN a Oo  Oo mam NOU AUNI O       hat       4 O8      IA T    bw  63  64  65  66  67  65  69  70  71  ve  Lo  74  AS   76  a7  78  19  80  81  82  35  84  35  86  57  88    IV    MAR ARA ITS Ss O AS O ee E AN  ge SA E A O E    89  90  91  92  95  94  BO  96  Oy  96  99  00  01  02  US  04  o5  06  07  08  09          DOM  NN      A mama vV          Ss KR BA ODS DR    A IGE Ov Weep Sp HO NS ee       Fonts Appendix    Using GAUSS for Windows95    Microb    GW WWW CN CN EN  O COND OA W       Omn rane WYO    O    O 90000 a oO oO ay  Oo Onno WHY   CO    NXV A H de    02     arm    00 NO Maha 0NnN  gt O0ss    61  62  65  64  65  66  Cg  68  69  70  71  EZ  qa  74  ES  FO  ZL   78  7 9  80  81  82  83  O4  85  86  OF  88    Xxe ce CHUHD A TO ZF SEU XAC TITO m713mmooUu gt aoaosy V    389  gQ  gil  92  ES  94  93  96  97  98  99  00  01  02  03  0   GS  06  07  08  09          Oak WN     
89. ecutable only within the scope of the procedure and can be  reached only by calling the procedure     Programs    A program is any set of statements that are run together at one time  There are two  sections within a program     Main Section    The main section of the program is all of the code that is compiled together without  relying on the autoloader  This means code that is in the main file or is included in the  compilation of the main file with an  include statement  All executable code  should be in the main section     Using GAUSS for Windows95    There must always be a main section even if it consists only of a call to the one and  only procedure called in the program  The main program code is stored in an area of  memory that can be adjusted in size with the new command     Secondary Sections    Secondary sections of the program are files that are neither run directly nor included  in the main section with  include statements     The secondary sections of the program can be left to the autoloader to locate and  compile when they are needed  Secondary sections must have only procedure  definitions and other nonexecutable statements      include statements are allowed in secondary sections as long as the file being  included does not violate the above criteria     Here is an example of a secondary section     declare matrix tol   1 0e 15        proc feg a b    retp  abs  a b   lt  tol      endp     Compiler Directives    4 4    Compiler directives are commands that t
90. eeeseceeneeecaeeeeeeeeeeeeesecsencaeeeeeeees 10 1  Writing  ELFOS A A Ade 10 3  Data Exchange A ed 11 1  Formats  Supported 10 a e a et 11 1  Data Exchange  Procedures      oomioiioiian ted 11 2  Global Variables   iio a E td 11 3  Data Transformations    xiii ba ia ci 12 1  Using Data Loop Statement ienenge n a nan nn cnn naar a 12 2  Using Other Statements sicrie nn nrnn nan iani iaia 12 2  Debugging Data Loops  esii neeme A Se A ee 12 2      Translation PRASE nine Sit ceteied as ebhiatdvaniatstexdevelan a aa AO A EAA EENET 12 3  Compilation Phaseoleae ren eae e aa esas heeds aa e are aE Eaa Eaa aE E 12 3  EX cutlons PRaS x eda nas aene AAA a A AA 12 3  Reserved Variables cool A ee a iiaae Rants eee is 12 3  Publication Quality Graphics      oooccccnonoccnncncninnnnnnnnncnannnncnnnncrnnnn rre eran 13 1  General Desi cai aaa dd bold vans ENA 13 1  Using Publication Quality GraphicS      oonoccccnnnnnncccnnnnoccccccnnnoncccnnnnnnccncnnnnnnccc nana aoas 13 2    Getting Started  da id 13 2  Graphics Coordinate SySteM   ooonnnnccccnnnnccccnnononcnncnnnnnnn o nn n rro rn nr nn rr 13 6  Graphics Graphic  Panas da 13 6  TiledGraphic P ae  es bdees eee ena ets eae et 13 6  Overlapping Graphic Panels a e a aaa a a eaa aaa aaa in aeaieie 13 7  Nontransparent Graphic Panels         cccccccccccccccccncncnnoananannnncanononononononononononnnnnnnnnnnon 13 7  Transparent Graphic Panels            cccccccccccccccceceeceeseeeaeseseseeeeeseeeseseseceeeeesesesesenenenss 13 7  Using Graphic Pan
91. el Functions     coooonoocccccnoconcccccnononcncnonannnccnn nono nnccnn AERA 13 8  Inch Units in Graphics Graphic PanelS   ooocionocccccnccccccccccconcnnnonnnnnnnnnnnnnnnncannn nn nnnnnnos 13 9  Saving Graphic Panel Configurati0NS      ooonnnnnnnccnnnnnaccccnonnnncccnnnnnnrn cnn arar rra 13 9  Graphics Text Elements sico coat a Dedo dal ae a igen ls kta tao Eek 13 9  Selecting Fonts  toos ri GT ask aa ae es 13 10  Greek and Mathematical SyMboIs                 ccccceccccceeeeeeeeeeeeeeceeeeeeeeeesesenscnseeeeeetees 13 11  Colo rs ode oe shes da ee do fea 13 12  Global Control Variables civic da ed 13 13  Utilities  sai esata a aoe aa a aE a a Eha Ei eaaa 14 1  ATOG A e e e a el 14 1  Command  SUMMA 14 1  COMMANGS mes ato a no O A a o a O AO Mad   14 3  Examples icocii nasa 14 11  Error Messages iii ios 14 13  Be NEAS E dt sy cee buna A E EEA 14 15  Report molana EE E tha e A o td cat e elt 14 16  Using LIBEIST sa a E een  O es oo eal oes Mada  14 17  Error Messages iii a 15 1  Maximizing Performance    cocccccccncnnnnnnnnonnnnneconenennnnnnnnnnnnnnnnnnnnnnnnrnnnnnnnn are nn nr nn nnn enanas 16 1  Library System  innata ias 16 1  A 2 ue E A Ss ian td Chae ea aA te Lt dee peti de E ahd Me 16 2  Virtual Me mMOry urticaria tai 16 2  Data  Sets aee an a ed ee eee reer aes 16 2  Hard  Disk  Maintenant issen ena e a td ERE EEE 16 3  CRU Cache  E A A E A deca 16 3  Fonts AppendiX          lt  lt  lt  lt omiiiiii a o daa anua ca A 1  OA ale E E de ol ecuhe lS antics Labisoned de tecte
92. ell GAUSS how to process a program during  compilation  Directives determine what the final compiled form of a program will be   They can affect part or all of the source code for a program  Directives are not  executable statements and have no effect at run time     The  include statement mentioned earlier is actually a compiler directive  It tells  GAUSS to compile code from a separate file as though it were actually part of the file  being compiled  This code is compiled in at the position of the  include statement     Here are the compiler directives available in GAUSS      define Define a case insensitive text replacement or flag variable    definecs Define a case sensitive text replacement or flag variable    undef Undefine a text replacement or flag variable     ifdef Compile code block if a variable has been  define   d      ifndef Compile code block if a variable has not been  define   d    iflight Compile code block if running GAUSS Light     Language Fundamentals     else Else clause for  if  else  endif code block     endif End of  if  else  endif code block     include Include code from another file in program     1lineson Compile program with line number and file name records    linesoff   Compile program without line number and file name records      srcfile Insert source file name record at this point  currently used when  doing data loop translation       srcline Insert source file line number record at this point  currently used  when doing data loop transla
93. emporary file    One of the temporary files could not be opened  The directory may be full     G0295 Error writing temporary file    One of the temporary files could not be written to  The disk may be full     G0296 Can t raise negative number to nonintegral power    G0300 File handle must be a scalar    G0301 Syntax error in library    G0302 File has been truncated or corrupted    getname File header cannot be read   load Cannot read input file  or file header cannot be read     open File size does not match header specifications  or file header  cannot be read     G0317 Can t open temp file    G0336 Disk full    G0339 Can t debug compiled program    G0341 File too big    G0347 Can t allocate that many globals    G0351 Warning  Not reinitializing   declare       The symbol is already initialized  It will be left as is     Error Messages    G0352 Warning  Reinitializing   declare       The symbol is already initialized  It will be reset     G0355 Wrong size line matrix    G0360 Write error    G0364 Paging error    G0365 Unsupported executable file type    G0368 Unable to allocate translation space    G0369 Unable to allocate buffer    G0370 Syntax Error in code statement    G0371 Syntax Error in recode statement    G0372 Token verify error    Notify Aptech Systems     G0373 Procedure definition not allowed    A procedure name appears on the left side of an assignment operator     G0374 Invalid make statement    G0375 make Variable is a Number    G0376 make Variable is Procedu
94. endp     Procedures and Keywords    i   TM VIV   is  Ss      token  s      sum   stof tok      rr    sum     The keyword defined above will print the string argument passed to it  The argument  will be printed enclosed in single quotes     Calling a Keyword    When a keyword is called  every character up to the end of the statement  excluding  the leading spaces  is passed to the keyword as one string argument  For example  if    you type  add 12 3 4 5   the keyword will respond    The sum is  15 00    Here is another example   add   the keyword will respond    The argument is a null    string    Using GAUSS for Windows95    Passing Procedures to Procedures    Procedures and functions can be passed to procedures in the following way     proc max x y      procedure to return maximum     if x gt y   retp  x    else   retp  y    endif   endp   proc minix  y      procedure to return minimum     1f x lt y   retp  x    else   retp  y    endif   endp   fn lgsqrt x    In sqrt x       function to return    log of square root    NA    proc myproc  amp f1  amp f2 x y    local fl proc  f2 fn  2   z   f1 x y    retp f2 z       endp     6 8    Procedures and Keywords    The procedure myproc takes four arguments  The first is a procedure   1 that has two  arguments  The second is a function   2 that has one argument  It also has two other  arguments that must be matrices or scalars  In the local statement    1 is declared to  be a procedure and   2 is declared to be a function  They can be 
95. ent    Write data to a data set     File I O    Matrix Data    Reading    Files containing numeric data that are delimited with spaces or commas and are small  enough to fit into a single matrix or string can be read with load  Larger ASCII data  files can be converted to GAUSS data sets with the ATOG utility program  see    ATOG   page 14 1   ATOG can convert packed ASCII files as well as delimited files     For small delimited data files  the load statement can be used to load the data  directly into a GAUSS matrix  The resulting GAUSS matrix must be no larger than  the limit for a single matrix     For example   load x     datl asc     will load the data in the file dat 1 asc into an Nx1 matrix x  This method is  preferred because rows  x  can be used to determine how many elements were  actually loaded  and the matrix can be reshape   d to the desired form     load x     datl asc   if rows x  eq 500   x   reshape x 100 5      else        errorlog    Read Error      end     endif     For quick interactive loading without error checking  use    load x 100 5    datl asc     This will load the data into a 100x5 matrix  Ifthere are more or fewer than 500  numbers in the data set  the matrix will automatically be reshaped to 100x5   Writing    To write data to an ASCII file  the print or print   m command is used to print to  the auxiliary output  The resulting files are standard ASCII files and can be edited  with GAUSS   s editor or another text editor     The output and outw
96. er data in output file   Setting output file to double precision   The output file contains character data  The type was set to double precision  automatically    atog   Character data longer than 8 bytes were truncated  The input file contained character elements longer than 8 bytes  The conversion  continued and the character elements were truncated to 8 bytes    atog   Disk Full   The output disk is full  The output file is incomplete    atog   Found character data in numeric field   This is a warning that character data was found in a variable that was specified as  numeric  The conversion will continue    atog   Illegal command   An unrecognizable command was found in a command file     14 13    Using GAUSS for Windows95    14 14    atog   Internal error  Notify Aptech Systems     atog   Invalid delimiter  The delimiter following the backslash is not supported     atog   Invalid output type  Output type must be I  F  or D     atog   Missing value symbol not found  No missing value was specified in an ms ym statement     atog   No Input file  No ASCII input file was specified  The input command may be missing     atog   No input variables  No input variable names were specified  The invar statement may be missing     atog   No output file          No output file was specified  The output command may be missing   atog   output type d required for character data  Character data in output file will be lost   Output file contains character data and is not double precision    
97. er pass has run out of memory  Notify Aptech Systems   G0010 Can t open output file  G0011 Compiled file must have correct extension  GAUSS requires a   gcg extension     G0012 Invalid drive specifier    G0013 Invalid filename    G0014 File not found    G0015 Directory full    G0016 Too many  includes     included files are nested too deep     G0017 WARNING  local outside of procedure    A local statement has been found outside a procedure definition  The  local statement will be ignored     G0018 Read error in program file    G0019 Can t edit  gcg file    Error Messages    G0020 Not implemented yet    Command not supported in this implementation     G0021 use must be at the beginning of a program    G0022 User keyword cannot be used in expression    G0023 Illegal attempt to redefine symbol to an index    variable    G0025 Undefined symbol    A symbol has been referenced that has not been given a definition     G0026 Too many symbols    The global symbol table is full   To set the limit  see new in the GAUSS  Language Reference      G0027 Invalid directory    G0028 Can t open configuration file  GAUSS cannot find the configuration file     G0029 Missing left parenthesis    G0030 Insufficient workspace memory    The space used to store and manipulate matrices and strings is not large  enough for the operations attempted   To make the main program space  smaller and reclaim enough space to continue  see new in the GAUSS  Language Reference      G0031 Execution stack too deep   
98. essing Enter runs all code from the GAUSS prompt line to the line the cursor is  on if the final line ends with a          If the final line does not end with a          Enter starts  a new line     OFF Pressing Enter starts a new line   Click the Enter Ex  status on the Status bar to toggle the status between the two  options     Cursor Location    The line number and column number where the cursor is located appears on  the Status bar for the active window  When a block of text is selected  the  values indicate the first position of the selected text     Insert    Insert appears on the Status bar when typing replaces the existing text with text you  enter  When Insert does not appear on the Status bar  typing inserts text without  deleting the existing text  Press the Insert key to toggle between the two conditions     NUM appears on the status bar to indicate the Num Lock key has been pressed and the  keypad numbers are active  Some keyoard shortcuts are only active when you use the  numbers on the keybapd instead of the numbers across the top of the keyboard     Press the Num Lock key to toggle between the two conditions     Caps    CAPS appears on the status bar to indicate the Caps Lock key has been pressed and all  text you enter will appear in upper case  When Caps does not appear on the Status bar   the alphabetic keys you type will appear in lower case  or  if the Shift key is pressed   in upper case     Press the Caps Lock key to toggle between the two conditions  
99. everal matrix options  including the number of  digits to the right of the decimal point  cell height and width  and whether pressing the  Enter key moves the cursor down or over one cell  These options  along with screen  position and window state  are saved between sessions     DOS Compatibility Window    You use the DOS Compatibility Window command to open a DOS window during a  GAUSS session     Configure Menu    3 22    You use the Configure menu commands to set how you want GAUSS to look and  operate  The Configure menu contains the following entries     Preferences    You use the Preferences command to specify how GAUSS operates     You can choose to make the setting permanent by selecting All in the Document  section or Current to apply the changes only to the current document     Display Tab    Using the Windows Interface    You use the Font Type control to specify which font attributes the editor uses  The  default font is FixedSys  You can set the font name  font size  font color  and the font  styles     You use the Back Color control to specify the background color used by the editor   The default color is the system background color     You use the Scrollbars control to specify the type of scrollbar used   None  Horizontal   Vertical  Both  or Auto  The default is Auto     You use the View toolbar buttons as control to specify whether the toolbar buttons are  displayed with Icons or text  The default setting is Icons  Changing the setting from  text to icons req
100. explicit retp statement     There can be multiple retp statements in a procedure  and they can be anywhere    inside the body of the procedure     End of Procedure Definition    The endp statement marks the end of the procedure definition     endp     An implicit retp statement that returns nothing is always generated here  so it is  impossible to run off the end of a procedure without returning  If the procedure was  defined to return one or more objects  executing this implicit return will result in a  Wrong number of returns error message and the program will terminate     Calling a Procedure  Procedures are called like this   dog i j k     F  y   cat i j k    R    x y Z     bat i j k       call bat  i j k   ee    no returns     one return     multiple returns       ignore any returns       Procedures are called in the same way that intrinsic functions are called  The  procedure name is followed by a list of arguments in parentheses  The arguments must    be separated by commas    If there is to be no return value  use  proc  0    dog x y 2Z     when defining the procedure  and use  dog ak 4 3     or  call dog ak 4 3      when calling it     Using GAUSS for Windows95    The arguments passed to procedures can be complicated expressions involving calls to  other functions and procedures  This calling mechanism is completely general  For  example     y   dog cat  3 x bird x y   2 1      is legal     Keywords    A keyword  like a procedure  is a subroutine that can be called i
101. expression too complex    An expression is too complex  Break it into smaller pieces  Notify Aptech  Systems     G0032 fn function too large    15 3    Using GAUSS for Windows95    15 4    G0033 Missing right index bracket    G0034 Missing arguments    G0035 Argument too large    G0036 Matrices are not conformable    For a description of the function or operator being used and conformability  tules  see    Matrix Operators     page 5 4  or the GAUSS Language Reference     G0037 Result too large    The size of the result of an expression is greater than the limit for a single  matrix     G0038 Not all the eigenvalues can be computed    G0039 Matrix must be square to invert    G0040 Not all the singular values can be computed    G0041 Argument must be scalar    A matrix argument was passed to a function that requires a scalar     G0042 Matrix must be square to compute determinant    G0043 Not implemented for complex matrices    G0044 Matrix must be real    G0045 Attempt to write complex data to real data set    Data sets  unlike matrices  cannot change from real to complex after they are  created  Use create complex to create a complex data set     G0046 Columns don t match    The matrices must have the same number of columns     Error Messages    G0047 Rows don t match    The matrices must have the same number of rows     G0048 Matrix singular    The matrix is singular using the current tolerance     G0049 Target matrix not complex    G0050 Out of memory for program    The mai
102. f an implicit decimal  point if necessary     outvar is not used with packed ASCII files  Instead  invar is used to specify only  those variables to be included in the output file     For packed ASCII files  the syntax of the invar command is  invar record reclen  format  variables  format  variables    where     reclen the total record length in bytes  including the final carriage return line  feed if applicable  Records must be fixed length   format  start  length  prec  where   start starting position of the field in the record  1 is the first position  The  default is 1   length length of the field in bytes  The default is 8     prec optional  a decimal point will be inserted automatically prec places  in from the RIGHT edge of the field     If several variables are listed after a format definition  each succeeding field will be  assumed to start immediately after the preceding field  If an asterisk is used to specify  the starting position  the current logical default will be assumed  An asterisk in the  length position will select the current default for both length and prec  This is  illegal   3 8        The type change characters   and   are used to toggle between character and numeric  data type     Any data in the record that is not defined in a format is ignored     The examples below assume a 32 byte record with a carriage return line feed  occupying the last 2 bytes of each record  The data can be interpreted in different ways  using different invar statements   
103. f the main file  The search path used by the  autoloader is first the current directory  and then the paths listed in the src_path  configuration variable in the order they appear  src_path can be defined in the  GAUSS configuration file     Forward References    When the compiler encounters a symbol that has not previously been defined  it is  called a    forward reference     GAUSS handles forward references in two ways   depending on whether they are    left hand side    or    right hand side    references     7 1    Using GAUSS for Windows95    Left Hand Side    A left hand side reference is usually a reference to a symbol on the left hand side of  the equal sign in an expression such as     x   5     Left hand side references  since they are assignments  are assumed to be matrices  In  the previous statement  x is assumed to be a matrix and the code is compiled  accordingly  If  at execution time  the expression actually returns a string  the  assignment is made and the type of the symbol x is forced to string     Some commands are implicit left hand side assignments  There is an implicit left   hand side reference to x in each of these statements     clear x   load x     open x   myfile     Right Hand Side    A right hand side reference is usually a reference to a symbol on the right hand side of  the equal sign in an expression such as     z   6  y   z   dog     print y     In the program above  since dog is not previously known to the compiler  the  autoloader will se
104. f there is an  existing file by the name of mydata asc  it will be overwritten     output file   mydata asc reset   screen off     format  rd 1 8     File I O    open fp   mydata   do until eof fp    print readr fp 200     endo   fo   close fp      end     The output     reset command will create an auxiliary output file called  mydata asc to receive the output  The window is turned off to speed up the  process  The GAUSS data file mydata  dat is opened for reading  and 200 rows  will be read per iteration until the end of the file is reached  The data read will be  printed to the auxiliary output mydata asc only  because the window is off     General File 1 0    getf will read a file and return it in a string variable  Any kind of file can be read in  this way as long as it will fit into a single string variable     To read files sequentially  use   open to open the file and use fgets  fputs  and  associated functions to read and write the file  The current position in a file can be  determined with fte11  The following example uses these functions to copy an  ASCII text file     proc copy src  dest      local fin  fout  str     fin   fopen src     rb       if not fin   retp  1      endif     9 5    Using GAUSS for Windows95    fout   fopen dest     wb       Le ONO  faa    call close fin     retp  2      endif     do until eof  fin    str   fgets fin  1024    if fputs  fout  str     1   call close fin    call close fout    retp  3    endif     endo     call close fin    call
105. f this is a scalar zero  nothing will be drawn   Default is 0      M 1  item type and coordinate system   1 line in plot coordinates   line in inch coordinates   line in pixel coordinates   circle in plot coordinates   circle in inch coordinates    radius in plot coordinates    YI no OW  amp    W DN    radius in inch coordinates    13 20     M  2      M  3 7     line type   1 dashed  dotted    Publication Quality Graphics    short dashes    dots and dashes    solid    2  3  4 closely spaced dots  5  6    coordinates and dimensions       1   line in plot coordinates      M  3    M  4    M 5    M  6    M  7     x starting point   y starting point   x ending point   y ending point     0 if this is a continuation of a curve  1 if  this begins a new curve       2   line in inches      M  3    M  4    M 5    M  6    M  7     x starting point   y starting point   x ending point   y ending point     0 if this is a continuation of a curve  1 if  this begins a new curve       3   line in pixel coordinates      M  3    M  4    M  5    M  6    M  7     x starting point   y starting point   x ending point   y ending point     0 if this is a continuation of a curve  1 if  this begins a new curve       4   circle in plot coordinates      M  3    M  4    M 5    M  6     x center of circle   y center of circle   radius in x plot units     starting point of arc in radians     13 21    Using GAUSS for Windows95    13 22    _pline3d     M  8    M  9      M  7  ending point of arc in radians     
106. f zero     The variable type flags immediately follow the variable names  They are 1 byte binary  integers  one per column  padded to an even 8 byte boundary  A 1 indicates a numeric  variable and a 0 indicates a character variable     The contents of the data set follow the header and start on an 8 byte boundary  Data is  either 2 byte signed integer  4 byte single precision floating point  or 8 byte double  precision floating point     Matrix v96    Offset    File I O    Description       0 3  4 7  8 11  12 15  16 19  20 23  24 27  28 31  32 35  36 39  40 43  44 47  48 51  52 55  56 59    60 63    64 67  68 71  72 75  76 127    always OXFFFFFFFF   always 0   always OXFFFFFFFF   always 0   always OXFFFFFFFF   OxFFFFFFFF for forward byte order  0 for backward byte order  OxFFFFFFFF for forward bit order  0 for backward bit order  always OXABCDEFO1   currently 1   reserved   floating point type  1 for IEEE 754   1008  double precision data    8  the size in bytes of a double matrix   0   real matrix  1   complex matrix    1   imaginary part of matrix follows real part  standard GAUSS style   1   imaginary part of each element immediately follows real part   FORTRAN style     number of dimensions   0   scalar   1   row vector   2   column vector or matrix    1   row major ordering of elements  2   column major  always 0  header size  128   dimensions   4  padded to 8 byte boundary    reserved    If the data is a scalar  the data will directly follow the header     9 19    Using
107. following entries     Undo    You use the Undo command to remove your last changes in the active window  Up to  256 changes or the last time you saved the file  which ever comes first  can be undone   Keyboard Shortcut  CTRL Z   BRIEF Keypad Shortcut  Star          Redo    You use the Redo command to restore changes in the active window you removed  using the Undo Edit command     Using GAUSS for Windows95    3 12    Cut    You use the Cut command to delete the selected text from the active window and place  a copy of it onto the Windows clipboard     A  Toolbar Shortcut     Keyboard Shortcut  CTRL X  BRIEF Keypad Shortcut  Minus          Copy    You use the Copy command to copy the selected text from the active window to the  Windows clipboard     Eo  Toolbar Shortcut   Keyboard Shortcut  CTRL C  BRIEF Keypad Shortcut  Plus          Paste    You use the Paste command to copy text from the Windows clipboard to the active  window at the cursor position     B  Toolbar Shortcut     Keyboard Shortcut  CTRL V  BRIEF Keypad Shortcut  Ins  Insert     Delete    You use the Delete command to delete the selected text in the active window  The  keyboard Delete key also deletes selected text or  if no text is selected  characters to  the right of the cursor     Clear to End    You use the Clear to End command to delete all text from the cursor to the end of text     Using the Windows Interface    A  Toolbar Shortcut     Keyboard Shortcut  F7    Clear All    You use the Clear All command 
108. g  lab       204m 201  2   204m 201  1  1  204m m 201 2            asclabel  lab 0      This example illustrates the use of several of the special Simgrma symbols     _pmsgstr       2041 2011 2 204p         20le   204m  2012  201 2 d 204m           This produces  V1  2n Jet du  Colors  0 Black 8 Dark Grey  1 Blue 9 Light Blue  2 Green 10 Light Green  3 Cyan 11 Light Cyan  4 Red 12 Light Red  5 Magenta 13 Light Magenta  6 Brown 14 Yellow  7 Grey 15 White    13 12    Publication Quality Graphics    Global Control Variables    The following global variables are used to control various graphics elements  Default  values are provided  Any or all of these variables can be set before calling one of the  main graphing routines  The default values can be modified by changing the  declarations in pgraph  dec and the statements in the procedure graphset in  pgraph src  graphset can be called whenever the user wants to reset these  variables to their default values     _pageshf    _pagesiz    _parrow    2x1 vector  the graph will be shifted to the right and up if this is not 0   If this is 0  the graph will be centered on the output page  Default is 0     Note  Used internally   For the same functionality  see axmargin in  the GAUSS Language Reference   This is used by the graphics  graphic panel routines  The user must not set this when using the  graphic panel procedures     2x1 vector  size of the graph in inches on the printer output   Maximum size is 9 0 X 6 855 inches  unrotated  o
109. g program is legal   proc  2    cmcplx x    local r c   r   rows  x    c   cols x    retp x zeros r c       endp     proc  2    cminv xr x1      local ixy  zr  Zi        ixy   inv xr   xi     inv xr xi ixy     real part of inverse       zr    zi  ixy zr     imaginary part of inverse       Using GAUSS for Windows95    retp zr zi      endp     proc  2    cmmult  xr  xi yr yi    local zr z1   zr   xr yr xi y1   Zi   xr yl1 xi yr   retp zr zi      endp       xr x1i     cmcplx rndn 3 3         yr yi     cmcplx rndn 3 3         zr zi     cmmult  cminv xr xi  cminv yr yi          gqr qi     cmmult  yr  yi cminv yr yi        ll      wr wi      cmmult  yr  yi  cminv cmmult  cminv xr x1  yr y1        Saving Compiled Procedures    When a file containing a procedure definition is run  the procedure is compiled and is  then resident in memory  The procedure can be called as if it were an intrinsic  function  If the new command is executed or you quit GAUSS and exit to the  operating system  the compiled image of the procedure disappears and the file  containing the procedure definition will have to be compiled again     If a procedure contains no global references  that is  if it does not reference any global  matrices or strings and it does not call any user defined functions or procedures  it can  be saved to disk in compiled form ina   fcg file with the save command  and loaded  later with the Loadp command whenever it is needed  This will usually be faster than  recompiling  For examp
110. graph  dec to change the default  colors  see    Colors     page 10 12   _pesel is not documented  elsewhere      scalar or 1X5 vector  allows plot cropping for different graphic  elements to be individually controlled  Valid values are 0  disabled   or 1  enabled   If cropping is enabled  any graphical data sent outside  the axes area will not be drawn  If this is scalar  _perop is expanded  to a 1x5 vector using the given value for all elements  All cropping is  enabled by default      1  crop main curves symbols    2  crop lines generated using _pline    3  crop arrows generated using _parrow     13 17    Using GAUSS for Windows95     4  crop circles arcs generated using _pline    5  crop symbols generated using _psym   This example will crop main curves  and lines and circles drawn by  _pline   perdp    gt     Ll  1 0  1 0  ys  _pcross scalar  If 1  the axes will intersect at the  0 0  X Y location if it is    visible  Default is 0  meaning the axes will be at the lowest end of the  X Y coordinates     _pdate date string  If this contains characters  the date will be appended and  printed     The default is set as follows  the first character is a font selection  escape code      _pdate       201GAUSS       If this is set to a null string  no date will be printed   For more    information on using fonts within strings  see    Graphics Text  Elements     page 13 9      _perrbar Mx9 matrix  draws one error bar per row of the input matrix  If scalar  0  no error bars will be
111. has been set equal to the ith pointer     is declared to be a procedure and is  called as a procedure in the retp statement     Multiple Returns from Procedures    Procedures can return multiple items  up to 1023  The procedure is defined like this  example of a complex inverse     proc  2    cminv xr xi       2  specifies number of  return values  8    local ixy  zr  Zi        ixy   inv xr   xi    zr   inv xr x1 ixy     real part of inverse      zi    ixy zr     imaginary part of inverse     retp zr zi      return  real part     imaginary part        endp   It can then be called like this     zr zi     cminv  xr  xi      To make the assignment  the list of targets must be enclosed in braces     Also  a procedure that returns more than one argument can be used as input to another  procedure or function that takes more than one argument     proc  2    cminv xr x1      local axy   2  21        ixy   inv xr   xi   zr   inv xr xi ixy     real part of inverse     Zi    1xy Zr     imaginary part of inverse       6 10    Procedures and Keywords    retp zr zi      endp     proc  2    cmmult  xr  xi yr yi    local zr z1   zr   xr yr xi y1   Zi   xr yl1 xi yr   retp zr zi      endp       zr zi     cminv  cmmult  xr x1 yr y1        The two returned matrices from cmmult    are passed directly to cminv    in the  statement above  This is equivalent to the following statements       tr ti     cmmult  xr x1 yr yl1        zr zi     cminv tr ti      This is completely general  so the followin
112. he new file  it will be automatically backed  up will all other open files according to the settings you have selected in the Configure  menu Preferences Files tab     O  Toolbar Shortcut   Keyboard Shortcut  CTRL N  Open File  You use the Open command to open an existing file for viewing or editing  You can    enter or select the directory and filename in the Windows Open dialog box     Toolbar Shortcut   amp    Keyboard Shortcut  CTRL O   Save File   You use the Save command to save your changes to the file in the active window  If    the file is untitled  you are prompted for a path and filename         Toolbar Shortcut     Keyboard Shortcut  CTRL S    Using GAUSS for Windows95    Print    You use the print command to print the active file or selected text from the active  window     Toolbar Shortcut   Keyboard Shortcut  CTRL P  Cut    You use the Cut command to delete the selected text from the active window and place  a copy of it onto the Windows clipboard     Toolbar Shortcut     Keyboard Shortcut  CTRL X  BRIEF Keypad Shortcut  Minus          Copy    You use the Copy command to copy the selected text from the active window to the  Windows clipboard     E  Toolbar Shortcut  g  Keyboard Shortcut  CTRL C  BRIEF Keypad Shortcut  Plus          Paste    You use the Paste command to copy text from the Windows clipboard to the active  window at the cursor position     Toolbar Shortcut   Keyboard Shortcut  CTRL V  BRIEF Keypad Shortcut  Ins  Insert     Using the Windows Interf
113. hed must be in matrices  For example   x   seqa 1 1 50      y   sin x      Graphics Format Setup    Most of the graphics elements contain defaults that allow the user to generate a plot  without modification  These defaults  however  may be overridden by the user through  the use of global variables and graphics procedures  Some of the elements custom  configurable by the user are axes numbering  labeling  cropping  scaling  line and  symbol sizes  and types  legends  and colors     Publication Quality Graphics    Calling Graphics Routines    The graphics routines take as input the user data and global variables that have  previously been set  It is in these routines where the graphics file is created and  displayed     Following are three PQG examples  The first two programs are different versions of  the same graph  The variables that begin with _p are the global control variables used  by the graphics routines   For a detailed description of these variables  see  Global  Control Variables   page 13 12      Example 1 The routine being called here is a simple XY plot  The entire window  will be used  Four sets of data will be plotted with the line and symbol attributes  automatically selected  This graph will include a legend  title  and a time date stamp   time stamp is on by default         library pgraph     activate PGRAPH library      graphset     reset global variables      x   sega  1  1 100      generate data      y   sin x     y   y   y  8   y  6   y  4     4 curves
114. hes  use  _parrow     112 2 3 0 2 11 10 2 6 0   Bi Ae 2 2 3s Oe Aon OZ Ge Ooo 9  _parrow3 Mx12 matrix  draws one 3 D arrow per row of the input matrix  If  scalar zero  no arrows will be drawn    M 1  x Starting point in 3 D plot coordinates    M  2  y starting point in 3 D plot coordinates    M  3  z Starting point in 3 D plot coordinates    M  4  x ending point in 3 D plot coordinates    M  5  y ending point in 3 D plot coordinates    M  6  z ending point in 3 D plot coordinates    M  7  ratio of the length of the arrow head to half its width    M  8  size of arrow head in inches     13 14    _paxes    Publication Quality Graphics     M  9  type and location of arrow heads  This integer  number will be interpreted as a decimal expansion mn   For example  if 10  then m   1 n   0     m type of arrow head     O solid  1 empty  2 open  3 closed    n location of arrow head   O none  1 at the final end  2 at both ends   M 10  color of arrow  see    Colors     page 10 12    M 11  line type   1 dashed  dotted  short dashes    dots and dashes  solid   M 12  controls thickness of lines used to draw arrow  This value    may be zero or greater  A value of zero is  normal line width     2  3  4 closely spaced dots  5  6    To create two single headed arrows  located using plot coordinates   use    _parrow3    111222 3 0 2 11 10 6 0   S SD 2 Oo BP OO E EA OS O E    scalar  2X1  or 3X1 vector for independent control for each axis  The  first element controls the X axis  the second control
115. id meaningless redefinition errors and declare warnings  never  declare a global more than once in any one file  Redefinition error messages  and declare warnings are meant to help you prevent name conflicts  and  will be useless to you if your code generates them normally     By following these guidelines  any declare warnings and redefinition errors you  get will be meaningful  By knowing that such warnings and errors are significant  you  will be able to debug your programs more efficiently     7 12    Compiler    GAUSS allows you to compile your large  frequently used programs to a file that can  be run over and over with no compile time  The compiled image is usually smaller  than the uncompiled source  GAUSS is not a native code compiler  rather  it compiles  to a form of pseudocode  The file will have a   gcg extension     The compile command will compile an entire program to a compiled file  An  attempt to edit a compiled file will cause the source code to be loaded into the editor if  it is available to the system  The run command assumes a compiled file if no  extension is given  and that a file with a   gcg extension is in the src_path  A  saveall command is available to save the current contents of memory in a compiled  file for instant recall later  The use command will instantly load a compiled program  or set of procedures at the beginning of an ASCII program before compiling the rest of  the ASCII program file     Since the compiled files are encoded binary fi
116. idth commands are used to control the auxiliary output  The  print or print   m command is used to control what is sent to the output file     9 3    Using GAUSS for Windows95    9 4    The window can be turned on and off using screen  When printing a large amount  of data to the auxiliary output  the window can be turned off using the command    screen off     This will make the process much faster  especially if the auxiliary output is a disk file     It is easy to forget to turn the window on again  Use the end statement to terminate  your programs  end will automatically perform screen on and output off     The following commands can be used to control printing to the auxiliary output     format Specify format for printing a matrix    output Open  close  rename auxiliary output file or device   outwidth   Auxiliary output width    printfm Formatted matrix print    print Print matrix or string    screen Turn printing to the window on and off     This example illustrates printing a matrix to a file   format  rd 8 2   outwidth 132   output file   myfile asc reset   screen off   PEINE    Xx   output off     screen on     The numbers in the matrix x will be printed with a field width of 8 spaces per number   and with 2 places beyond the decimal point  The resulting file will be an ASCII data  file  It will have 132 column lines maximum     A more extended example follows  This program will write the contents of the  GAUSS file mydata dat into an ASCII file called mydata asc  I
117. ile 6 13  statement 4 2  4 28  executable 4 2  nonexecutable 4 2  string array concatenation 5 15  string arrays 4 17  4 18  string concatenation 5 14    string files 9 13  string  long 4 29  strings  graphics 13 9  subroutine 4 28  substitution 5 16  5 17  symbol names 4 29  syntax 4 28    T       temporary files 16 1   tensor 5 6   thickness  line 13 18  13 22  13 23  tick marks 13 11   tilde 5 8   tiled windows 13 6   tmp environment string 16 1  tolerance C 1   translation phase 12 3  transparent windows 13 7  transpose 5 7   transpose  bookkeeping 5 7  troubleshooting  libraries 7 11  TRUE 4 23  5 9    U       unconditional branching 4 27    V       vector 12 2  vectors 4 31  virtual memory 16 2    WwW       windows  graphics 13 4  13 6  nontransparent 13 7  overlapping 13 7  tiled 13 6  transparent 13 7    X       xor 5 12  5 13   xor 5 13    Z    Index       zooming 13 26    Index 5    
118. imensional arrays of double precision numbers  All matrices are  implicitly complex  although if it consists only of zeros  the imaginary part may take  up no space  Matrices are stored in row major order  A 2x3 real matrix will be stored  in the following way  from the lowest addressed element to the highest addressed  element      1 1   1 2   1 3   2 1   2 2   2 3           A 2x3 complex matrix will be stored in the following way  from the lowest addressed  element to the highest addressed element      real part   1 1   1 2   1 3   2 1   2 2   2 3                  imaginary part   1 1   1 2   1 3   2 1   2 2   2 3     Conversion between complex and real matrices occurs automatically and is  transparent to the user in most cases  Functions are provided to provide explicit  control when necessary     All numbers in GAUSS matrices are stored in double precision floating point format   and each takes up 8 bytes of memory  This is the IEEE 754 format     Language Fundamentals       Significant  Bytes Data Type Digits Range  Br  HUME PON A ioar Sil erenao    Matrices with only one number  1X1 matrices  are referred to as scalars  and matrices  with only one row or column  1XN or Nx1 matrices  are referred to as vectors     Any matrix or vector can be indexed with two indices  Vectors can be indexed with  one index  Scalars can be indexed with one or two indices also  because scalars   vectors  and matrices are the same data type to GAUSS     The majority of functions and operator
119. ining caterpil   y   zeros 3 1        cat      the result will be a 3X1 matrix  each element containing cat   If we use the y created above in the following   k   y       fish      the result will be a 3x1 matrix with each element containing catfish   If we then use k created above   t             k 1 1    the result will be a string containing catfish   If we use the same k to create z as follows   z      dog       k 1 11   the result will be a string containing dogcat fish   String Array Concatenation       Vertical string array concatenation    X     dog        ll    y vers     x    y   print k     dog  fish    Using GAUSS for Windows95       Horizontal string array concatenation    xX    dog        ll    y WFEiSsh     x    y     print k     dog fish    String Variable Substitution    5 16    In a command such as  create f1   olsdat with x 4 2     by default  GAUSS will interpret olsdat as the literal name of the GAUSS data file  you want to create  It will also interpret x as the literal prefix string for the variable  names x1 x2 x3 x4     To get the data set name from a string variable  the substitution operator     could be  used as follows     dataset      olsdat        create fl      dataset with x 4 2     To get the data set name from a string variable and the variable names from a  character vector  use the following     dataset      olsdat        vnames     age  pay  sex          create fl      dataset with    vnames 0 2     The general syntax is       variable_na
120. ither the Command or Edit window     Using GAUSS for Windows95    Output is shown below the code in Cmnd mode  In Split I O mode  the output appears  in the Output window  To toggle between the current input and the Output window   use the Toggle Input Output Window command     Toolbar Shortcut     Run Commands    Run Current File    Run marked block  Keyboard Shortcut  Ctrl F2    Pause Program    You use the Pause Program command to suspend a program while it is in the process  of running     Output is shown below the code in Cmnd mode  In Split I O mode  the output appears  in the Output window  To toggle between the current input and the Output window   use the Toggle Input Output Window command     Stop Program    You use the Stop Program command to stop the program currently running and return  control to the editor     Toolbar Shortcut     Insert GAUSS Prompt    You use the Insert GAUSS Prompt command to manually add the GAUSS prompt at  the cursor position  The GAUSS prompt      is automatically displayed following the  execution of GAUSS code     Toolbar Shortcut   Keyboard Shortcut  Shift F2    Using the Windows Interface    Toggle Set Clear Breakpoint    You use the Toggle Set Clear Breakpoint command to enable or disable a line  breakpoint at the cursor in the active file  Breakpoints usually remain valid when a file  is changed and lines are inserted or deleted but are lost when a file is closed  whether  it is saved or not     Line breakpoints are displayed in th
121. ked text Ctrl F2  Main File F2  Running Commands Interactively    Description    When you run commands interactively  the actual code being processed is called the   active block   The active block is that code between the GAUSS prompt        and  the end of the current line  Thus  the active block can be one or more lines of code     You can run the code using one of the following    e Selecting Run Commands from the Action menu    e Pressing Ctrl F2    e Clicking the  Run Commands  icon on the Toolbar   e Clicking the GAUSS Status on the status bar    e Pressing Enter     A block of code can be executed by selecting the block with the mouse and then  running that block using any of the first four methods     Note  The GAUSS prompt        at the beginning of the selected text is ignored   The GAUSS output occurs on the subsequent line     Options    e An Output Mode option specifies whether the output is displayed in the Command  window  Cmnd I O  or the Output window  Split I O   You can toggle this option  by clicking the status on the Status bar     3 3    Using GAUSS for Windows95      An Enter to Execute option is available which determines whether pressing Enter  will run the GAUSS command  You can toggle this option by clicking the status  on the Status bar     Running Programs in Files    You can execute the currently displayed file  the active file  by using one of the  following     e Selecting Run Program on the Action menu    e Pressing Ctrl F2    e Clicking the 
122. l be given     Hard Delimited ASCII Files Hard delimited files have a printable character as a  delimiter between elements  Two delimiters without intervening data between them  will be interpreted as a missing  If  n is specified as a delimiter  the file should have  one element per line and blank lines will be considered missings  Otherwise   delimiters must be printable characters  The dot       is illegal and will always be  interpreted as a missing value  To specify the backslash as a delimiter  use MM  If      is specified as a delimiter  the file will be assumed to contain one case or record per  line with commas between elements and no comma at the end of the line     For hard delimited files  the delimit subcommand is used with the invar  command  The delimit subcommand has two optional parameters  The first  parameter is the delimiter  the default is a comma  The second parameter is an    N     If  the second parameter is present  ATOG will expect N delimiters  If it is not present   ATOG will expect N 1 delimiters     This example   invar delimit   N    name   var 5      will expect a file like this           BILL   222 3  123 242  456 4  SAD 933 2              STEVE  624 3  340 3    624 3  63945              TO   244 2  834 3  602 3  3334  822 5     This example    invar delimit      name   var 5    or   invar delimit   name   var 5      will expect a file like this            BIEL yo 222 934 L232 456 4  A IS SA             STEVE  624 3  340 3  7 624 3  639 5     
123. l other windows   The program source window may be the Command or Edit window and the  execution window may be the Command window  Cmnd I O mode  or Output  window  Split I O mode      Dual Horizontal    You use the Dual Horizontal command to horizontally tile the program source  and execution windows within the main window and minimize all other  windows  The program source window may be the Command or Edit window  and the execution window may be the Command window  Cmnd I O mode  or  Output window  Split I O mode      Tile Vertically    You use the Tile Vertically command to arrange all open windows vertically on the  screen without any overlap     Tile Horizontally    You use the Tile Horizontally command to arrange all open windows horizontally on  the screen without any overlap     Using the Windows Interface    Cascade    You use the Cascade command to arrange all open windows on the screen   overlapping each  with the active window on top    Arrange Icons   You use the Arrange Icons command to arrange all minimized windows across the  bottom of the main GAUSS window    No Split    You use the No Split command to remove a split you made to the active window  You  use either the Split Vertically or Split Horizontally commands to create a split window     Toolbar Shortcut     Split Vertical    You use the Split Vertically command to split the active window into two vertical  panes  This allows you to view two different areas of the same document to facilitate  split windo
124. lative to the horizontal graphic  panel size and Y coordinates will be scaled relative to the vertical graphic panel  size     Saving Graphic Panel Configurations    The functions savewind and loadwind allow the user to save graphic panel  configurations  Once graphic panels are created  using makewind and window    savewind may be called  This will save to disk the global variables containing  information about the current graphic panel configuration  To load this configuration  again  call loadwind   See loadwind in the GAUSS Language Reference      Graphics Text Elements    Graphics text elements  such as titles  messages  axes labels  axes numbering  and  legends  can be modified and enhanced by changing fonts and by adding  superscripting  subscripting  and special mathematical symbols     13 9    Using GAUSS for Windows95    To make these modifications and enhancements  the user can embed    escape codes    in  the text strings that are passed to title  xlabel  ylabel  and asclabel or  assigned to _ppmsgstr and _plegstr     The escape codes used for graphics text are     1000 String termination character  null byte       Enter superscript mode  leave subscript mode      Enter subscript mode  leave superscript mode      Interpret next character as literal      207 Select font number n  see    Selecting Fonts     following      The escape code  L can be embedded into title strings to create a multiple line title     title    This is the first line lthis is the second     
125. le     save path   c  gauss cp procl proc2 proc3     loadp path   c  gauss cp procl proc2 proc3     Procedures and Keywords    The name of the file will be the same as the name of the procedure  witha  fcg  extension   For details  see loadp and save in the GAUSS Language Reference      All compiled procedures should be saved in the same subdirectory so there is no  question where they are located when it is necessary to reload them  The loadp path  can be set in your startup file to reflect this  Then  to load in procedures  use    loadp procl proc2 proc3     Procedures that are saved in     cg files will NOT be automatically loaded  It is  necessary to explicitly load them with loadp  This feature should be used only when  the time necessary for the autoloader to compile the source is too great  Also  unless  these procedures have been compiled with  lineson  debugging will be more  complicated     6 13    Libraries    The GAUSS library system allows for the creation and maintenance of modular  programs  The user can create    libraries    of frequently used functions that the GAUSS  system will automatically find and compile whenever they are referenced in a  program     Autoloader    The autoloader resolves references to procedures  keywords  matrices  and strings that  are not defined in the program from which they are referenced  The autoloader  automatically locates and compiles the files containing the symbol definitions that are  not resolved during the compilation o
126. le statement is  compiled  binary code is added to the program being compiled at the current location  of the instruction pointer  This binary code will be executed whenever the interpreter  passes through this section of the program  If the code is in a loop  it will be executed  each iteration of the loop     Here are some examples of executable statements   y   34 25   print y   x   1372094003 4     Nonexecutable Statements    Nonexecutable statements are statements that have an effect only when the program is  compiled  compile time   They generate no executable code at the current location of  the instruction pointer     4 2    Language Fundamentals    Here are two examples   declare matrix x     1 2 3 4       external matrix ybar     Procedure definitions are nonexecutable  They do not generate executable code at the  current location of the instruction pointer  Here is an example     zed   rndn 3 3      proc sqrtinv  x    local y   y   sqrt  x    retp  ytinv x       endp     zsi   sqrtinv  zed      There are two executable statements in the example above  the first line and the last  line  In the binary code that is generated  the last line will follow immediately after the  first line  The last line is the cal1 to the procedure  This generates executable code   The procedure definition generates no code at the current location of the instruction  pointer     There is code generated in the procedure definition  but it is isolated from the rest of  the program  It is ex
127. lements 13 9  graphics windows 13 4  13 6  graphics  publication quality 13 1  grid subdivisions 13 18   gt 5 10    gt 5 11    H       hard delimited 14 5  hardware requirements 2 1  hat operator 5 6  5 16   help 14 4   help  atog command 14 1  hidden lines 13 25  horizontal direct product 5 7       indefinite 4 19   indexing matrices 4 30  5 13  indexing procedures 5 14  infinity 4 20   initialize 6 3    Index    inner product 5 4   input  atog command 14 1  input 14 4   instruction pointer 4 2  interactive draft mode 13 24  interpreter 4 1   intrinsic function 4 6   invar 14 4   invar  atog command 14 1    K       keep 12 2  keyword 6 1  6 6  Kronecker 5 6    L       label 4 27  4 29  6 1   lag 12 2   le 5 9    le 5 10   least squares 5 5   left hand side 7 2   legend 13 2   lib_path 14 18   liblist 14 17   libraries  troubleshooting 7 11  library 7 1   library symbol listing utility 14 17  library  optimizing 16 1   line thickness 13 18  13 22  13 23  13 26  line type 13 13  13 14  13 18  13 20  13 22  13 23  linear equation solution 5 5   lines 13 1   listwise 12 2   literal 4 16  5 16   loadp 6 12   local 6 2   local variable declaration 6 3  local variables 4 6  6 3   logical operators 5 11   long string 4 29   looping 4 23   It 5 9   It 5 10   LU decomposition 5 5       magnification 13 26    Index 3    Using GAUSS for Windows95    main program code 4 4  main section 4 3   make 12 2   math coprocessor 2 1  matrices  indexing 4 30  matrix conformability 5 1  matrix  emp
128. les  the compiler is useful for developers  who do not want to distribute their source code     Compiling Programs    Programs are compiled with the compile command     8 1    Using GAUSS for Windows95    Compiling a File    Source code program files that can be run with the run command can be compiled to   gcg files with the compile command     compile qxy e     All procedures  global matrices and strings  and the main program segment will be  saved in the compiled file  The compiled file can be run later using the run command   Any libraries used in the program must be present and active during the compile  but  not when the program is run  If the program uses the dlibrary command  the  d11  files must be present when the program is run and the dlibrary path must be set to the  correct subdirectory  This will be handled automatically in your configuration file  If  the program is run on a different computer than it was compiled on  the  d11 files  must be present in the correct location  sysstate  case 24  can be used to set the  dlibrary path at run time     Saving the Current Workspace    The simplest way to create a compiled file containing a set of frequently used  procedures is to use saveall and an external statement     library pgraph     external proc xy logx logy loglog hist        saveall pgraph     List the procedures you will be using in an external statement and follow it with a  saveall statement  It is not necessary to list procedures you do not explicitly ca
129. les in a data set when it creates it  The create command will   also  The function vartypef gets a vector of variable type information from a data  set  This vector of ones and zeros can be used by print fm when printing your data   Since GAUSS does not know whether a matrix has character or numeric information   it is up to you to specify which type of data it contains when printing the contents of  the matrix   For details  see print and print fm in the GAUSS Language  Reference      Most functions that take a string argument will take an element of a character matrix  also  interpreting it as a string of up to 8 characters   Special Data Types    The IEEE floating point format has many encodings that have special meaning  The  print command will print them accurately so that you can tell if your calculation is  producing meaningful results     NaN    There are many floating point encodings that do not correspond to a real number   These encodings are referred to as NaN   s  NaN stands for Not a Number     Certain numerical errors will cause the math coprocessor to create a NaN called an     indefinite     This will be printed as a  NaN when using the print command  These  values are created by the following operations      oo plus  oo        0 minus  00   co minus  oo  0 x oo    co   oo    0 0    Using GAUSS for Windows95    4 20    operations where one or both operands is a NaN    trigonometric functions involving co    INF    When the math coprocessor overflows  the resu
130. line numbers corresponding to the main  file     Compilation Phase    In the compilation phase  the temporary file is compiled  Depending on the status of  line number tracking  error messages encountered in this phase will be printed with  the file name and line numbers corresponding to both the main file and the temporary  file     Execution Phase    In the execution phase  the compiled program is executed  Depending on the status of  line number tracking  error messages will include line number references from both  the main file and the temporary file     Reserved Variables    The following local variables are created by the translator and used in the produced    code   x_CV x_iptr x_ncol x_plag  x drop xkeep x_nlag x_ptrim  x_fpin x_lval x_nrow x_shft  x_fpout x_lvar x_ntrim x_tname  x_i x_n x_out x_vname  x_in x_name x_outtyp x_x    These variables are reserved  and should not be used within a dataloop  endata section     12 3    Publication Quality 1 3  Graphics    GAUSS Publication Quality Graphics  PQG  is a set of routines built on the graphics  functions in GraphiC by Scientific Endeavors Corporation     The main graphics routines include xy  xyz  surface  polar  and log plots  as well as  histograms  bar  and box graphs  Users can enhance their graphs by adding legends   changing fonts  and adding extra lines  arrows  symbols  and messages     The user can create a single full size graph  inset a smaller graph into a larger one  tile  a window with several equally
131. line or selected text to  Windows Clipboard  BRIEF  keypad preference only   KEYPAD MINUS Delete line or selected text to  Windows Clipboard  BRIEF  keypad preference only   KEYPAD STAR Undo last edit action  BRIEF  keypad preference only   INS Paste text from Windows  Clipboard to cursor position in  active window  BRIEF keypad  preference only   Toolbar  Left click Select toolbar item  Right click Help for toolbar item  Menu Bar    The Menu bar is located below the Title bar along the top of the window  You can  view the commands on a menu by either clicking the menu name or pressing ALT n     3 8    Using the Windows Interface    where n is the underlined letter in the menu name  For example  to display the File  menu  you can either click on File or press ALT F     The following menus are available   e File Menu     Edit Menu   e Search Menu   e Mode Menu     Debug Menu   e Action Menu   e Configure Menu   e Window Menu    e Help Menu    File Menu    You use the File Menu to access the file  printer setup  and exit commands  Some of  these actions can also be executed from the Toolbar  The File menu contains the  following entries     New    You use the New command to open a new  untitled document in the Command or Edit  window  whichever is active     Note  New  unsaved documents are not automatically backed up until you save them   giving them a file name  After you save the new file  it will be automatically backed  up with all other open files according to the setting
132. lity that converts ASCII files into GAUSS data  sets  ATOG can convert delimited and packed ASCII files into GAUSS data sets   ATOG can be run from a batch file or the command line     The syntax is     atog cmdfile    cmdfile is the name of the command file  If no extension is given    cmd will be  assumed  If no command file is specified  a command summary will be displayed     Command Summary  The following commands are supported in ATOG     append Append data to an existing file   complex Treat data as complex variables    input The name of the ASCII input file   invar Input file variables  column names    msym Specify missing value character   nocheck Do not check data type or record length     14 1    Using GAUSS for Windows95    14 2    output The name of the GAUSS data set to be created   outtyp Output data type   outvar List of variables to be included in output file     preservecase Preserves the case of variable names in output file     The principal commands for converting an ASCII file that is delimited with spaces or  commas are given in the following example     input agex asc    output agex    invar   race   age pay   sex region   outvar region age sex pay    outtyp d     From this example  a delimited ASCII file agex asc is converted to a double  precision GAUSS data file agex   dat  The input file has five variables  The file will  be interpreted as having five columns        column name data type  1 race character  2 AGE numeric  3 PAY numeric  4 sex charac
133. ll   but are called from another procedure  because the autoloader will automatically find  them before the saveal1 command is executed  Nor is it necessary to list every  procedure you will be calling  unless the source will not be available when the  compiled file is use   d     Remember  the list of active libraries is NOT saved in the compiled file so you may  still need a library statement in a program that is use   ing a compiled file     Debugging    If you are using compiled code in a development situation where debugging is  important  compile the file with line number records  After the development is over     8 2    Compiler    you can recompile without line number records if the maximum possible execution  speed is important  If you want to guarantee that all procedures contain line number    records  put a new statement at the top of your program and turn line number tracking  on     File  O    The following is a partial list of the I O commands in the GAUSS programming    language   close  closeall  colsf  create  dfree   eof  fcheckerr  fclearerr  fflush  fgets  fgetsa  fgetsat  fgetst  fileinfo    files    Close a file    Close all open files    Number of columns in a file    Create GAUSS data set    Space remaining on disk    Test for end of file    Check error status of a file    Check error status of a file and clear error flag    Flush a file   s output buffer    Read a line of text from a file    Read multiple lines of text from a file    Read multiple li
134. lt will be a properly signed infinity   Subsequent calculations will not deal well with an infinity  it usually signals an error  in your program  The result of an operation involving an infinity is most often a NaN     DEN  UNN    When some math coprocessors underflow  they may do so gradually by shifting the  significand of the number as necessary to keep the exponent in range  The result of  this is a denormal  DEN   When denormals are used in calculations  they are usually  handled automatically in an appropriate way  The result will either be an unnormal   UNN   which like the denormal represents a number very close to zero  or a normal   depending on how significant the effect of the denormal was in the calculation  In  some cases the result will be a NaN     Following are some procedures for dealing with these values     The procedure isindef will return 1  true  if the matrix passed to it contains any  NaN   s that are the indefinite mentioned earlier  The GAUSS missing value code as  well as GAUSS scalar error codes are NaN   s  but this procedure tests only for  indefinite     proc isindef  x         retp  not x     __INDEFn                endp     Be sure to call gausset before calling isindef  gausset will initialize the value  of the global __ INDEF n to this platform specific encoding     The procedure normal will return a matrix with all denormals and unnormals set to  Zero     proc normal  x    retp x     abs x    gt  4 19e 307       endp     Language Fundamen
135. m an  Edit window  the entire file is executed  This is the equivalent of the GAUSS  run  filename  statement     If more than one file is loaded  the last file loaded or executed becomes the active file  when you click the Edit status on the Status bar  Repeated clicking of the Edit status  cycles through all loaded Edit windows     Output Window    Command  Edit  and Output always appear on the Status bar  When the background  color behind Output is a lighter shade of gray  the Output window has focus and is  considered the  active  window     When the output mode is Split I O  output is written to the Output window  GAUSS  commands cannot be executed from this window     Command I O   Split 1 0    When your program is run  the output will appear in the Command window in Cmnd  T O mode or in the Output window in Split I O mode  The output mode appears on the  Status Bar     You usually use the Cmnd I O mode when you want to enter a series of GAUSS  commands and watch the output appear directly below the code you ve entered     You can use the Split I O mode to display the results of the commands in the Output  window without the input commands     Toolbar Shortcut     Cmnd I O mode E  Split I O mode BE    Keyboard Shortcut  F6    Enter Ex  On Off    The Enter Exe  status appears on the Status bar when the Command window is active   It indicates how pressing the Enter key is handled in the Command window  The two  choices are On and Off     Using GAUSS for Windows95    On Pr
136. mal random numbers   x   rndn 8000 1      you could get a count of the elements with an absolute value greater than 1 with a do  loop  like this     c   0    i   1    do while i  lt  rows  x    if abs x i    gt  1    c   ctl    endif   i   itl    endo     print c     Or  you could use   c   sumc abs x    gt  1      print c     The do loop takes over 40 times longer     Virtual Memory    The following are hints for making the best use of virtual memory in GAUSS     Data Sets    Large data sets can often be processed much faster by reading them in small sections   about 20000 40000 elements  instead of reading the entire data set in one piece   maxvec is used to control the size of a single disk read  Here is an example  The ols    16 2    Maximizing Performance    command can take either a matrix in memory or a data set on disk  Here are the times  for a regression with 100 independent variables and 1500 observations on an IBM  model 80 with 4 MB RAM running at 16 MHz     ols 0 y x  matrices in memory 7 minutes 15 83 seconds  ols     olsdat     0 0  data on disk  maxvec   500000  8 minutes 48 82 seconds  ols     olsdat     0  0  data on disk  maxvec   25000  1 minute 42 77 seconds    As you can see  the fastest time occurred when the data was read from disk in small  enough sections to allow the ols procedure to execute entirely in RAM  This ensured  that the only disk I O was one linear pass through the data set     The optimum size for maxvec depends on your available RAM an
137. mands are written for the Microsoft Visual C C   compiler  ver  2 0     The Visual C C   linker allows you to specify a module definition file  which is a text  file that describes the dynamic library to be created  In this example  the module  definition file is my funcs   def  It includes information on how the library is to be  initialized and terminated  how to handle its data segment  etc  It also needs to list the  symbols that will be exported  1 e   made callable by other processes  from the  dynamic library  Assume that myfuncl candmyfunc2 c contain the FLI  functions funcl      func2     and func3     and a static funciton func4    that  is called by the others  but never directly from GAUSS  Then myfuncs def would  look like this     Foreign Language Interface                BRARY myfuncs       EXPORTS   funcl  func2  func3    As you can see  creating dynamic libraries from the command line can be quite an  arcane process  For this reason  we recommend that you create dynamic libraries from  inside the Visual C C   workbench environment  rather than from the command line     Writing FLI Functions  Your FLI functions should be written to the following specifications   1  Take 0 or more pointers to doubles as arguments     This does not mean you cannot pass strings to an FLI function  Just recast  the double pointer to a char pointer inside the function     2  Take those arguments either in a list or a vector   3  Return an integer    In C syntax  then  your function
138. mation is then used in subsequent GAUSS sessions     Priority    You use the Priority command to set the threading and the priority level  You normally  implement a separate thread for every call to GAUSS  which allows you to do other    Using GAUSS for Windows95    things while a block of code is executing  For this  you set the Thread to None and the  priority to Normal  If you are not doing any foreground processing  you High     If you are running a long job in the background and want higher foreground  performance  you can change the priority to Low which will allocate more computing  resources foreground tasks     Non threaded behavior is possible  although not recommended  The output from a  GAUSS job will be displayed only after the complete block of code has been  executed  All user keystrokes and mouse actions are queued until the program has  finished running     Windows Menu    You use the Windows Menu commands to split a window into two panes and arrange  the windows to fit your preferences when more than one window is open  The active  window is the window which has the focus  You can toggle the focus between all open  windows using CTRL F6 or clicking in the window you want active  All open  windows are listed at the end of the Windows menu  The following commands can be  used to arrange and configure windows     Dual Vertical    You use the Dual Vertical command to vertically tile the program source and  execution windows within the main window and minimize al
139. me    Expressions are not allowed     Operators    The following commands are currently supported with the substitution operator         ll    create f1    dataset with    vnames 0 2        dataset using  cmdfile     ll    create fl  open f1      dataset    output file      outfile    load x      datafile    load path      lpath X y 2Z t Ww   save    name   x    save path      spath    run    prog     msym    mstring     Using Dot Operators with Constants    When you use those operators preceded by a          dot operators  with a scalar integer  constant  insert a space between the constant and any following dot operator   Otherwise  the dot will be interpreted as part of the scalar  that is  the decimal point   For example     let y   1 2 3   x   2  lt y    will return x as a scalar 0  not a vector of 0   s and 1   s  because  x   2  lt y     is interpreted as    x 2  lt y   and not as  x 2  lt y     Using GAUSS for Windows95    Be careful when using the dot relational operators    lt    S              gt    2   The  same problem can occur with other dot operators  also  For example     letra e de  de  y   x  2  x    will return y as a scalar  5 rather than a vector of  5   s  because  y   x  2  x     is interpreted as    y   x  2   x   and not as  y    x   2    x     The second division  then  is handled as a matrix division rather than an element by   element division     Operator Precedence    5 18    The order in which an expression is evaluated is determined by the pre
140. mmand  or they can be opened with the open command and read with the readr  command  With the readr command  a subset of the rows can be read  With the  load command  the entire matrix is load   ed     GAUSS matrix files can be open   ed for read  but not for append or for  update     If a matrix file has been opened and assigned a file handle  rowsf   and colsf can be  used to determine how many rows and columns it has without actually reading it into  memory  seekr and readr can be used to jump to particular rows and to read them  into memory  This is useful when only a subset of rows is needed at any time  This  procedure will save memory and be much faster than Load    ing the entire matrix into  memory     File Formats  This section discusses the GAUSS binary file formats     There are four currently supported matrix file formats        Version Extension Support   Small Matrix v89   fmt Obsolete  use v96   Extended Matrix v89   fmt Obsolete  use v96   Matrix v92   fmt Obsolete  use v96   Universal Matrix v96   fmt Supported for read write     Using GAUSS for Windows95    There are four currently supported string file formats        Version Extension Support   Small String v89   fst Obsolete  use v96   Extended String v89   fst Obsolete  use v96    String v92  fst Obsolete  use v96   Universal String v96 Est Supported for read write     There are four currently supported data set formats        Version Extension Support  Small Data Set v89  dat  Obsolete  use v96    dht  
141. mp src  feg proc    fne proc    With the exception of the library    1cg  files  these files must be located along your  src_path  The library files must be on your 1ib_path  With these files in place   the autoloader will be able to find everything needed to run the following programs     library fcomp   x   rndn 3 3    xi   inv x    xix   x1 x   if fegq xix eye 3     print    Inverse within tolerance         else        print    Inverse not within tolerance         endif     If the default tolerance of 1e   14 is too tight  the tolerance can be relaxed     library fcomp     x   rndn 3 3      xi   inv x    xix   x1 x   _fcmptol   le 12     reset tolerance       Libraries    if fegq xix eye 3             print    Inverse within tolerance       else   print    Inverse not within tolerance       endif   Troubleshooting    Below is a partial list of errors you may encounter in using the library system   followed by the most probable cause      4    error G0290      c  gauss lib prt leg      Library not  found  The autoloader is looking for a library file called prt   1cg  because it has been  activated ina library statement  Check the subdirectory listed in your 1lib_path  configuration variable for a file called prt  1cg    0    error G0292    prt dec    File listed in library not  found  The autoloader cannot find a file called prt   dec  Check for this file  It should exist  somewhere along your src_path  if you have it listed in prt   1cg   Undefined symbols    PRTVEC c  gau
142. n program area is full   To increase the main program space  see new  in the GAUSS Language Reference      G0051 Program too large    The main program area is full   To increase the main program space  see new  in the GAUSS Language Reference      G0052 No square root   negative element    G0053 Illegal index    An illegal value has been passed in as a matrix index     G0054 Index overflow    An illegal value has been passed in as a matrix index     G0055 retp outside of procedure    A retp statement has been encountered outside a procedure definition     G0056 Too many active locals    The execution stack is full  There are too many local variables active   Restructure your program  Notify Aptech Systems     G0057 Procedure stack overflow   expression too complex    The execution stack is full  There are too many nested levels of procedure  calls  Restructure your program  Notify Aptech Systems     15 5    Using GAUSS for Windows95    15 6    G0058 Index out of range    You have referenced a matrix element that is out of bounds for the matrix  being referenced     G0059 exec command string too long    G0060 Nonscalar index    G0061 Cholesky downdate failed    G0062 Zero pivot encountered    crout The Crout algorithm has encountered a diagonal element equal to  0  Use croutp instead     G0063 Operator missing    An expression contains two consecutive operands with no intervening  operator     G0064 Operand missing    An expression contains two consecutive operators with no in
143. nce have the  name    Untitled          The default is on     The Prompt on Exit option determines whether or not a prompt to verify exit is given  on an exit condition  The default is on     The Add         option determines whether or not a semicolon will be inserted at the end  of a line after ENTER has been pressed  The default is on     The Debugger Creates a Trace option specifies whether or not lines of code that have  been executed during a debugging run should be marked  as bold  or not  The default  is on     The Explicit Command option specifies that when the output is written to the  Command window on executing a file or a block of selected code  the command file is  augmented by the appropriate GAUSS command  The default is on     The Active becomes Main option specifies that when an active file is executed  the file  then becomes the new mainfile  The default Behavior is on  An active file can also be  set to be the main file by using the menu mode set main file item     Size Tab   The current size and position of the GAUSS interface is automatically retained  between sessions    Settings   Changes can be applied to all documents     default     or to just the current document   These settings are implemented for the current session only by clicking the Apply  button  and are implemented for both the current session and future session by    clicking the Save button  This saves the current configuration settings to the current  user s windows Registry  this infor
144. nes of text from a file  discarding newlines   Read a line of text from a file  discarding newline    Returns names and information of files matching a specification   Returns a directory listing as a character matrix     9 1    Using GAUSS for Windows95    filesa  fopen  fputs  fputst  fseek  fstrerror  ftell  getf  getname  iscplxf  load  loadd  loadm  loads  open  output  readr  rowsf  save  saved  seekr  sortd  typef    writer    ASCII Files    GAUSS has facilities for reading and writing ASCII files  Since most software can  read and write ASCII files  this provides a way of sharing data between GAUSS and  many other kinds of programs     9 2    Returns a list of files matching a specification   Open a file    Write strings to a file    Write strings to a file  appending newlines   Reposition file pointer    Get explanation of last file I O error    Get position of file pointer    Load a file into a string    Get variable names from data set    Returns whether a data set is real or complex   Load matrix file or small ASCII file  same as 1oadm    Load a small GAUSS data set into a matrix   Load matrix file or small ASCII file    Load string file    Open a GAUSS data set    Control printing to an auxiliary output file or device   Read a specified number of rows from a file   Number of rows in file    Save matrices  strings  procedures    Save a matrix ina GAUSS data set    Reset read write pointer in a data set    Sort a data set    Returns type of data set  bytes per elem
145. not found       Using LIBLIST  LIBLIST is executed with  liblist  flags libl lib2     libn    To put the listing in a file called Lib 1st  use  liblist  1  gt  lib lst    To convert all your   g files and list them in srcfile 1st  use    liblist  c    The numbers are there so that you can sort the listing and still tell which symbol  would be found first by the autoloader  You may have more than one symbol by the  same name in different files  LIBLIST can help you keep them organized so you do  not inadvertently use the wrong one     14 17    Error  Messages    The following is a list of error messages intrinsic to the GAUSS programming  language  Error messages generated by library functions are not included here     G0002 File too large  load Input file too large   getf Input file too large   G0003 Indexing a matrix as a vector    A single index can be used only on vectors  Vectors have only one row or only  one column     G0004 Compiler stack overflow   too complex    An expression is too complex  Break it into smaller pieces  Notify Aptech  Systems     G0005 File is already compiled    G0006 Statement too long    Statement longer than 4000 characters     15 1    Using GAUSS for Windows95    15 2    G0007 End of file encountered    G0008 Syntax error    Compiler Unrecognizable or incorrect syntax  Semicolon missing on  previous statement     create Unrecognizable statement in command file  or numvar or  outvar statement error     G0009 Compiler pass out of memory    Compil
146. nsidered TRUE and a zero value is considered FALSE   The logical operators return a 1 if TRUE and a 0 if FALSE  Decisions are based on the                   following truth tables   Complement  X not X  T F  F T   Conjunction   X X and Y  T T T  T F F  F T F  F F F          Using GAUSS for Windows95                                  Disjunction   xX X or Y   T T T   T F T   F T T   F F F  Exclusive Or   X X xor Y   T T F   T F T   F T T   F F F  Equivalence   X X eqv Y   T T T   T F F   F T F   F F T          For complex matrices  the logical operators consider only the real part of the matrices     The following operators require scalar arguments  These are the ones to use in if and  do statements     e Complement  z   not x   e Conjunction    z   x and y     5 12    Operators    e Disjunction  Zz   xor y   e Exclusive or  Zz  x xor y   e Equivalence  Zz   x eqv y   If the logical operator is preceded by a dot           the result will be a matrix of 1   s and 0   s  based upon an element by element logical comparison of x and y   e Element by element logical complement  z   mot x   e Element by element conjunction  z   x  and y   e Element by element disjunction  Z  x  r y   e Element by element exclusive or  Zz   xX  xor y   e Element by element equivalence    Z   x  eqv y     Other Operators    Assignment Operator  Assignments are done with one equal sign   y   3   Comma  Commas are used to delimit lists   clear X Y Z   to separate row indices from column indices within br
147. nteractively or from  within a GAUSS program  A keyword differs from a procedure in that a keyword  accepts exactly one string argument  and returns nothing  Keywords can perform  many tasks not as easily accomplished with procedures     Defining a Keyword    6 6    A keyword definition is much like a procedure definition  Keywords always are  defined with 0 returns and 1 argument  The beginning of a keyword definition is the  keyword statement     keyword name  strarg     name Name of the keyword  up to 32 alphanumeric characters or an  underscore  beginning with an alpha or an underscore     strarg Name that will be used inside the keyword for the argument that is  passed to the keyword when it is called  There is always one  argument  The name is known only in the keyword being defined   Other keywords can use the same name  but they will be separate  entities  This will always be a string  If the keyword is called with no  characters following the name of the keyword  this will be a null  string     The rest of the keyword definition is the same as a procedure definition   For more  information  see    Defining a Procedure     page 6 2   Keywords always return nothing   Any retp statements  if used  should be empty  For example     keyword add s     local tok  sum     if s S   o  print    The argument is a null string      retp     endif     print    The argument    sum   0    do until s              f tok  s      sum     endo    format  rd 1 2    print    The sum is     
148. obal references will be deleted from the global symbol table  This  autodeletion process is transparent to the user  since the symbols are automatically  located by the autoloader the next time the program is run  This process results in  more compile time  which may or may not be significant depending on the speed of  the computer and the size of the program     Autodelete OFF    1  user library  2  user specified libraries  3  gauss library    All  g files must be listed in a library  Forward references to symbols not listed in an  active library are not allowed  For example     x   rndn 10 10      y   sym x      forward reference to symbol       proc sym x    retp  x x         endp     7 3    Using GAUSS for Windows95    7 4    Use an external statement for anything referenced above its definition if  autodelete is OFF     external proc sym          x   rndn 10 10      Il    y sym x      proc sym x    retp  x x         endp     When autodelete is OFF  symbols not found in an active library will not be added to  the symbol table  This prevents the creation of uninitialized procedures in the global  symbol table  No deletion of symbols from the global symbol table will take place     Libraries    The first place GAUSS looks for a symbol definition is in the    active    libraries  A  GAUSS library is a text file that serves as a dictionary to the source files that contain  the symbol definitions  When a library is active  GAUSS will look in it whenever it is  looking for a s
149. ocedure definition endp statement    There is always one proc statement and one endp statement in a procedure  definition  Any statements that come between these two statements are part of the  procedure  Procedure definitions cannot be nested  local and retp statements are  optional  There can be multiple local and retp statements in a procedure    definition  Here is an example   proc  3    regress x  y    local xxi b ymxb sse sd t   xxi   invpd x   x    b   xxi    x y      ymxb   y xb     sse   ymxb    ymxb   rows  x  cols x     sd   sqrt  diag sse xxi     t   b  sd     retp b sd t      endp     This could be used as a function that takes two matrix arguments and returns three    matrices as a result  For example       b sd t     regress x y      Following is a discussion of the five parts of a procedure definition     6 2    Procedures and Keywords    Procedure Declaration  The proc statement is the procedure declaration statement  The format is     proc     rets      name    argl arg2    areN l       rets Optional constant  number of values returned by the procedure   Acceptable values here are 0 1023  the default is 1   name Name of the procedure  up to 32 alphanumeric characters or an    underscore  beginning with an alpha or an underscore     arg Names that will be used inside the procedure for the arguments that  are passed to the procedure when it is called  There can be 0 1023  arguments  These names will be known only in the procedure being  defined  Other procedu
150. on  in the columns of spreadsheets  A scalar can be used if all  columns are to have the same precision  Default is 4   _dxpren  does not always control the number of digits after the decimal  correctly when exporting to an Excel    x 1s  datasheet or  databook  Adjust this parameter within Excel after loading the  file      ASCII value of character that delimits fields in ASCII files   tab   9  comma   44  space   32   Default is space  32      Scalar  0 or 1  determining if column headers are written to   from ASCII files  If dxaschdr   1  headers are written  If  _dxaschdr   0  no headers are written  Default is 0     Scalar  0 or 1  determining if column headers are written to   from spreadsheet files  If _dxwkshdr   1  headers are  written  If _dxwkshdr   0  no headers are written  Default  is 0     Scalar that defines the missing value representation  Default is  the normal GAUSS representation  the indefinite NaN      Using GAUSS for Windows95    _dxprint Scalar  0 or 1  determining if progress messages are to be  printed to the window  _dxprint   1 prints messages   _dxprint   0 suppresses the print  Default is 1     11 4    Data 1 2  Transformations    GAUSS allows expressions that directly reference variables  columns  of a data set   This is done within the context of a data loop     dataloop infile outfile   drop wagefac wqlec shordelt foobly   csed   1n  sqrt  csed     select csed  gt  0 35 and married        y      make chfac   hcfac   wcfac     keep csed chfac 
151. ons  continue  conv  coreleft  cos    counts    diag  diagrv  disable  dlibrary  dllcall  do    endp  envget  eof  eq  eqv  erf    erfc    fn    countwts  create  crout  croutp  csrcol  csrlin    csrtype    cvtos    dos  dtvnormal    dtvtoutc    error  errorlog  exec  exp  external    eye    fputs    fclearerr  fflush  fft   ffti   fftn  fgets  fgetsa    gamma    ge  getf    hasimag    if  imag    indcv    key    fgetst  fileinfo  files  filesa  fix  floor    fmod    getname  getnamef    gosub    hess    indexcat  indnv    int    keyw    font   fontload  fontunload  fontunloadall  fopen   for    format    goto  graph  graphsev3    hsec    inv  invpd    invswp    keyword    Reserved Words Appendix    fputst  fseek  fstrerror  ftell  ftocv    ftos    gt    iscplx  iscplxf    ismiss    B 3    Using GAUSS for Windows95    le   let   lib  library  line   In    load    matrix  maxc    maxindc    ndpchk  ndpclex    oldfft  oldffti    packr  parse  pdfn  pi    loadexe  loadf  loadk  loadm  loadp  loads    local    meanc  minc    mininde    ndpentrl    ne    ones    open    plot  plotsym  pop  pqgwin    locate  log  lower  Ipos  Iprint  Ipwidth    lshow    miss  missrv    moment    new    not    openpqg    or    presn  print  printdos    printfm    It  Itrisol  lu    lusol    msym    output    outwidth    proc  prodc  push    rankindx  rcondl  readr  real  recserar  recsercp  reshape    retp    save  saveall  scalerr  scalmiss  schur  screen  scroll  seekr  sega  seqm    setvmode    t
152. ors    The following operators work on matrices  Some assume numeric data and others will  work on either character or numeric data     Numeric Operators    For details on how matrix conformability is defined for element by element operators   see    Element by Element Operators     page 5 1       Addition  y x  Z     Performs element by element addition       Subtraction or negation  MOS Rees  y    k     Performs element by element subtraction or the negation of all elements   depending on context       Matrix multiplication or multiplication  yprx  Zz     When z has the same number of rows as x has columns  this will perform matrix  multiplication  inner product   If x or z are scalar  this performs standard  element by element multiplication     5 4    Operators    Division or linear equation solution  x  b A     If A and b are scalars  it performs standard division  If one of the operands is a  matrix and the other is scalar  the result is a matrix the same size with the results  of the divisions between the scalar and the corresponding elements of the matrix   Use    for element by element division of matrices     If b and A are conformable  this operator solves the linear matrix equations     Linear equation solution is performed in the following cases     e If A is a square matrix and has the same number of rows as b  this  statement will solve the system of linear equations using an LU  decomposition     e IfA is rectangular with the same number of rows as b  this sta
153. our of the same data located in the lower left corner of the window     library pgraph     activate pgraph library          Generate data for surface and    contour plots       x   sega  10 0 1 71       note x is a row vector     y   sega  10 0 1 71      note y is a column vector     z   cos 5 sin x    y      zis a 71X71 matrix       begwind     makewind 9 6 855 0 0 0      Publication Quality Graphics       initialize graphics        graphic panels        first graphic panel         full size       makewind  9 2 6 855 2 1 1 0     second graphic panel       setwind 1      graphset    pzelr     1  2  3  4  title    cos 5 sin x     xlabel    X Axis         ylabel     Y Axis            inset to first          activate first graphic         panel         reset global variables           set Z level colors     y       set main title         set X axis label          set Y axis label       scale3d  miss 0 0  miss 0 0   515     scale Z axis       surface x y Z  5    nextwind     graphset   pzeler   Ly 2 3  4  _pbox   15     contour  x y Z         call surface routine          activate second graphic        panel          reset global variables               set Z level colors        white border          call contour routine       endwind     Display graphic panels       While the structure has changed somewhat  the four basic elements of the graphics  program are all here  The additional routines begwind  endwind  makewind   nextwind  and setwind are all used to control the graphics
154. p  These operators always return a scalar result     break and continue are used within do loops to control execution flow  When  break is encountered  the program will jump to the statement following the endo   This terminates the loop  When cont inue is encountered  the program will jump up  to the top of the loop and reevaluate the while or until expression  This allows  you to reiterate the loop without executing any more of the statements inside the loop     Language Fundamentals    do until eof fp      continue jumps here     x   packr readr fp 100       if scalmiss  x      continue     iterate again     endif   s   s   sumc x    count   count   rows x      if count   10000     break     break out of loop     endif   endo   mean   s   count     break jumps here       for loop  The fastest looping construct in GAUSS is the for loop     for counter  start  stop  step       Statements    endfor     counter is the literal name of the counter variable  start  stop  and step are scalar  expressions  start is the initial value  stop is the final value  and step is the increment     break and continue are also supported by for loops   For more information  see  for in the GAUSS Language Reference      4 25    Using GAUSS for Windows95    Conditional Branching  The if statement controls conditional branching     if scalar_expression     Statements    elseif scalar_expression     Statements    else     Statements    endif     The scalar_expression is any expression that returns a
155. phony v1 0 1 1  wrk  wrk    Using GAUSS for Windows95    File Extension          File Type  Export Import  dBase II  db2  db2  dBase III IV  dbf dbf  Paradox  FoxPro  Clipper   db   db  ASCII     character delimited  csv  txt  asc  cSv  txt  asc  ASCII     formatted  prn  prn  GAUSS data set  dat  dat    The newer releases of spreadsheets and databases can read their older formats   Specifically  the procedures will read data in all versions listed and will write data out  in the most compatible  or earliest  format  For example  the Lotus driver will read all  versions up to version 5 and will write data out to a generic version 1 0  wks file     You can import and export ASCII files     If you have a problem importing data  save it in an earlier spreadsheet or database  format  The same suffix does not necessarily mean the same data format     Importing sheet 0 or sheet 1 will import the first sheet of a spreadsheet   Most multi   sheet spreadsheets call this sheet 1      On export  elements that are missing values will be exported to spreadsheets as blank  cells  and to ASCII files as the value _dxmiss  On import  spreadsheet cells that are   ERR or  N A will be imported as GAUSS missing values  Elements from any format  that have the value _dxmiss will be imported as GAUSS missing values     Data Exchange Procedures    11 2    These four procedures are used for exchanging data with databases and spreadsheets     export Exports a GAUSS matrix to a specified file format   e
156. r   68 71 always 0   72 75 header size  128   columns   33  padded to 8 byte boundary  76 79 reserved   80 83 rows in data set   84 87 columns in data set   88 127 reserved    The variable names begin at offset 128 and are stored 32 bytes each in ASCII format   Each name corresponds to one column of data  Names less than 32 characters are  padded on the right with bytes of zero     The variable type flags immediately follow the variable names  They are 1 byte binary  integers  one per column  padded to an even 8 byte boundary  A 1 indicates a numeric  variable and a 0 indicates a character variable     Contents of the data set follow the header and start on an 8 byte boundary  Data is  either 2 byte signed integer  4 byte single precision floating point  or 8 byte double  precision floating point     9 21    Using GAUSS for Windows95    9 22    Foreign Language  Interface    The Foreign Language Interface  FLI  allows users to create functions written in C   FORTRAN  or other languages  and call them from a GAUSS program  The functions  are placed in dynamic libraries  DLLs  also known as shared libraries or shared  objects  and linked in at run time as needed  The FLI functions are     dlibrary Link and unlink dynamic libraries at run time     dilcall Call functions located in dynamic libraries     GAUSS recognizes a default dynamic library directory  a directory where it will look  for your dynamic link libraries when you call dlibrary  You can specify the default  director
157. r 6 855 x 9 0 inches   rotated   If this is 0  the maximum size will be used  Default is 0     Note  Used internally   For the same functionality  see axmargin in  the GAUSS Language Reference   This is used by the graphics  graphic panel routines  The user must not set this when using the  graphic panel procedures     Mx11 matrix  draws one arrow per row M of the input matrix  If scalar  zero  no arrows will be drawn      M  1  x starting point     M  2  y starting point     M  3  x ending point     M  4  y ending point     M  5  ratio of the length of the arrow head to half its width    M  6  size of arrow head in inches      M  7  type and location of arrow heads  This integer  number will be interpreted as a decimal expansion mn   For example  if 10  then m   1 n   0     m type of arrow head     0 solid  1 empty  2 open  3 closed    13 13    Using GAUSS for Windows95    n location of arrow head   O none  1 atthe final end  2 at both ends   M  8  color of arrow  see    Colors     page 10 12    M  9  coordinate units for location   1 x y starting and ending locations in plot coordinates  2 x y starting and ending locations in inches  3 x y starting and ending locations in pixels   M 10  line type     1 dashed   2 dotted   3 short dashes   4 closely spaced dots  5 dots and dashes    solid     M 11  controls thickness of lines used to draw arrow  This value  may be zero or greater  A value of zero is  normal line width     To create two single headed arrows  located using inc
158. r cleared in the active window  at the cursor using the breakpoint set and clear commands  Watch variables can also  be set prior to running the debugger     Toggle Breakpoint    You use the Toggle Set Clear Breakpoint command to enable or disable a line  breakpoint at the cursor in the active file  Breakpoints usually remain valid when a file  is changed and lines are inserted or deleted but are lost when a file is closed  whether  it is saved or not     The debugger displays the lines where your program will stop executing and wait for  user input  Line breakpoints are displayed with a red highlight     Procedure breakpoints occur at the beginning of a procedure and are not highlighted   Procedure breakpoints can only be added if the named procedure exists in the GAUSS  workspace     Using GAUSS for Windows95    Toolbar Shortcut     View Breakpoints    You use the View Breakpoints command to view a list of all breakpoints in your  program  The breakpoints are listed by line number  Any procedure breakpoints are  also listed  You can add  delete  and change breakpoints in the dialog box     Breakpoints usually remain valid when a file is changed and lines are inserted or  deleted but are lost when a file is closed  whether it is saved or not     The debugger displays the source code of your program  Line breakpoints are  displayed with a red highlight     Procedure breakpoints occur at the beginning of a procedure  and are not highlighted   Procedure breakpoints can only be 
159. r it is executed or not     e All edited files  All open editor files  including the active file  are saved before  execution  The Executed file and Active file checkboxes are automatically  checked if you select this option     Keypad Tab    You use the Keypad tab to select whether standard or BRIEF    commands are  associated with the                and  Ins  keys on the keyboard keypad     Using GAUSS for Windows95    Key       x    Ins    3 24    Keypad Functionality  Standard BRIEF    Copy line or block to scrap    Cut line or block to scrap  H Undo last edit    Toggle insert overtype Paste scrap at cursor  Options Tab    The Sound at end of job option determines whether or not a sound is played at the end  of the execution of GAUSS code  The sound can selected using the Select button and  played using the Test button  The default is off     The Sound at keystroke request option determines whether or not a sound is played  when a keystroke is required   for example if the GAUSS command keyw was issued   The sound can selected using the Select button and played using the Test button  The  default is off     The Add     to command option determines whether a semicolon will be inserted at  the end of a line after the Enter key has been pressed  The default is selected     The Explicit Command option specifies whether the appropriate commands should be  added to the Command window when executing a file  For Files  the statement   run lt filename gt   is added  For marked blo
160. ral rules of syntax for GAUSS programs     Statements    4 28    A GAUSS program consists of a series of statements  A statement is a complete  expression or command     Statements in GAUSS end with a semicolon with one exception  from the GAUSS  command line  the final semicolon in an interactive program is implicit if it is not  explicitly given      gauss  x 5  z rndn  3 3   y xtz    Language Fundamentals    Column position is not significant  Blank lines are allowed  Inside a statement and  outside of double quotes  the carriage return line feed at the end of a physical line will  be converted to a space character as the program is compiled     A statement containing a quoted string can be continued across several lines with a  backslash     s      This is one really long string that would be            difficult to assign in just a single line         Case  GAUSS does not distinguish between uppercase and lowercase except inside double  quotes    Comments       this kind of comment can be nested         this kind of comment cannot be nested 6     Extraneous Spaces    Extraneous spaces are significant in print and lprint statements where the space  is a delimiter between expressions     print x y Z     In print and lprint statements  spaces can be used in expressions that are in  parentheses     print  x   y   x   y      Symbol Names    Labels    The names of matrices  strings  procedures  and functions can be up to 32 characters  long  The characters must be alphanumeric
161. ram code but stops if a breakpoint is  encountered  Temporary breakpoints can be added or removed using the Toggle  Breakpoint command     Toolbar Shortcut   Keyboard Shortcut  b or Ctrl B    Run to Cursor runs all program code between the current line and the cursor position   ignoring any breakpoints     Using GAUSS for Windows95    3 42    Toolbar Shortcut   Keyboard Shortcut  Ctrl C    Run to Line runs all program code between the current line and the line number you  specify  ignoring any breakpoints    Keyboard Shortcut    or Ctrl L    Run to End runs all program between the current line and the end of the program     Toolbar Shortcut   Keyboard Shortcut  r or Ctrl R    Execute n steps runs the number of lines of program code you specify  Specify the  number of lines  n  to be executed counting from the beginning of the program  This  command will then execute n lines of code  ignoring any breakpoints     Keyboard Shortcut  s or Ctrl S    Restart restarts the debugging run using the current settings    Toolbar Shortcut    Exit terminates the current GAUSS debug execution    Keyboard Shortcut  x or Ctrl X   Space bar Pressing the Space bar executes the Step Over command   Enter key Pressing the Enter key executes the Step Into command     Window Control The Debug window is an MDI window like the other GAUSS  windows  You can toggle between the Debug and Output windows using Ctrl D     Breakpoints Breakpoints stop code execution where you have inserted them   Breakpoints 
162. raphs on one window or page     A graphic panel is any rectangular subsection of the window or page  Graphic panels  may be any size and position on the window and may be tiled or overlapping   transparent or nontransparent     Tiled Graphic Panels    13 6    Tiled graphic panels do not overlap  The window can easily be divided into any  number of tiled graphic panels with the window command  window takes three  parameters  number of rows  number of columns  and graphic panel attribute   1 transparent  0 nontransparent      Publication Quality Graphics    This example will divide the window into six equally sized graphic panels  There will  be two rows of three graphic panels     three graphic panels in the upper half of the  window and three in the lower half  The attribute value of 0 is arbitrary since there are  no other graphic panels beneath them     window  nrows ncols attr      window  2 3 0      Overlapping Graphic Panels    Overlapping graphic panels are laid on top of one another as they are created  much as  if you were using the cut and paste method to place several graphs together on one  page  An overlapping graphic panel is created with the makewind command     In this example  makewind will create an overlapping graphic panel 4 inches  horizontally by 2 5 inches vertically  positioned 1 inch from the left edge of the page  and 1 5 inches from the bottom of the page  It will be nontransparent     makewind  hsize vsize hpos vpos attr      window  2  3y 0    make
163. re    G0377 Cannot make Existing Variable    G0378 Cannot make External Variable    15 17    Using GAUSS for Windows95    15 18    G0379 Cannot    make String Constant    G0380 Invalid vector statement    G0381 vector    G0382 vector    G0383 Cannot    G0384 Cannot    G0385 Cannot    Variable is a Number    Variable is Procedure    vector Existing Variable    vector External Variable    vector String Constant    G0386 Invalid extern statement    G0387 Cannot    extern number    G0388 Procedures always external    A procedure name has been declared in an extern statement  This is a  warning only     G0389 extern    variable already local    A variable declared in an extern statement has already been assigned local    status     G0390 String constant cannot be external    G0391 Invalid code statement    G0392 code Variable is a Number    G0393 code Variable is Procedure    G0394    G0395    G0396    G0397    G0398    G0399    G0400    G0401    G0402    G0403    G0404    G0405    G0406    G0407    G0408    G0409    Error Messages    Cannot code Existing Variable    Cannot code External Variable    Cannot code String Constant    Invalid recode statement    recode Variable is a Number    recode Variable is Procedure    Cannot recode External Variable    Cannot recode String Constant    Invalid keep statement    Invalid drop statement    Cannot define Number    Cannot define String    Invalid select statement    Invalid delete statement    Invalid outtyp statement    outtyp already
164. re 1 to 48 with 3 as the default  Tab spacing is based  on the fixed system font     The Auto Indent option determines where the next line starts after pressing the Enter  key  When checked  the next line starts under the first non blank character of the  previous line  The default is unselected     The Expand Tabs option inserts the specified number of spaces instead of creating tab  stops  This option is useful when the column text select mode is specified  This option  is disabled in documents which use a proportional font  The default is unselected     Windows Tab    The Window Style control specifies whether windows open in the normal  the  default   maximized  or dual screen vertical or horizontal  state  In the dual screen  state  the current input file and Output windows are tiled in the main window     The Use this style at control specifies whether the windows style should only be used  at startup  the default  or always     The Tiling vertically results in control defines whether the windows are stretched  vertically or stacked     The Preferences configuration dialog specifies keyboard  tab  shortcut keys  fonts and  other options that can be set by the user  Changes can be applied to the current  window  or as a default for all widows  Changes can be made for the current session   or can be made permanent     Keyboard Tab    This dialog determines how the editor responds to the numeric  keypad  PLUS    keypad  MINUS   keypad  ASTERISK  and INSERT key  The default
165. red in the  Replace with  field in the Search dialog box  The search  starts at the cursor position and continues to the end of the text in the active window   The search can be case sensitive or case insensitive  and the replacement can be  unique or global     Toolbar Shortcut   Keyboard Shortcut  CTRL F  Find Again    You use the Find Again command to resume the search for the next occurrence of the  text you specified in the previous Find action     Using the Windows Interface    Toolbar Shortcut   Keyboard Shortcut  F3    Replace Again    You use the Replace Again command to find the next occurrence of the text you  replaced in the previous Replace command     Keyboard Shortcut  F4    Go To Line    You use the Go To Line command to move the cursor to the specified line number   Keyboard Shortcut  CTRL G    Bookmark    You use the Bookmark command to set  clear  and go to existing bookmarks from the  Bookmark Dialog box  Bookmarks are set using the Add command and removed  using the Remove command  You can go to a bookmark directly by selecting the  desired entry and clicking Go     Keyboard Shortcut    CTRL B for the Bookmark command   CTRL 1 to go to the first Bookmark   CTRL 2 to go to the second Bookmark  and so on    Mode Menu    You use the Mode Menu to set the various editing and window options you use when  editing and running GAUSS code and files  The Mode menu contains the following  entries     Toggle Command Output Window    You use the Toggle Input Output Win
166. res can use the same names  but they will be  separate entities     Local Variable Declarations    The local statement is used to declare local variables  Local variables are variables  known only to the procedure being defined  The names used in the argument list ofthe  proc statement are always local  The format of the local statement is    local x y f proc g fn z h keyword     Local variables can be matrices or strings  If  proc      n  or   keyword follows the  variable name in the local statement  the compiler will treat the symbol as if it were  a procedure  function  or keyword  respectively  This allows passing procedures   functions  and keywords to other procedures   For more information  see    Passing  Procedures to Procedures     page 6 8      Variables that are global to the system  that is  variables listed in the global symbol  table that can be shown with the show command  can be accessed by any procedure  without any redundant declaration inside the procedure  If you want to create variables  known only to the procedure being defined  the names of these local variables must be  listed in a local statement  Once a variable name is encountered in a local  statement  further references to that name inside the procedure will be to the local  rather than to a global having the same name   See clearg  varget  and varput  in the GAUSS Language Reference for ways of accessing globals from within  procedures that have locals with the same name      The Local statemen
167. ro  the existing macro is deleted     Using GAUSS for Windows95      If your macro is lengthy  consider creating a separate file and copying the  information from the file into the active window rather than using a macro to enter  the information     Keyboard Shortcut  F11  Toggles between Record Macro and Stop Recording  Macro     Playback Macro    You use the Playback Macro command to run a macro you recorded during the current  session of GAUSS  To run the macro  locate the cursor where you want the macro  sequence to begin and select Playback Macro  Playback Macro only appears on the  Edit menu after you have recorded a macro     Keyboard Shortcut  F12    Search Menu    3 14    You use the Search Menu to access commands for locating text in the active window   Some of these actions can also be executed from the Toolbar  The Search menu  contains the following entries     Find   Replace    You use the Find Replace command to find the specified text in the active window   After locating the text string  you can edit the text manually or replace the text with  what you have entered in the Search Dialog box and selecting the  Replace with   command     The Find option locates the specified text in the active window from the cursor  position down  The search can be case sensitive or case insensitive  Subsequent  searches for the same text can be resumed by pressing F3     The Replace option locates the specified text in the active window and replaces it with  the text you ente
168. rtional fonts  line block mode is used when  such a document has the focus  Column blocks usually work better when the Expand  Tabs option is enabled     All blocks can be manipulated using the edit keys    cut  copy  paste  and delete   Blocks can also be moved by dragging the selected block with the mouse  and can be  copied by pressing and holding down CTRL while dragging the selected block with  the mouse     Toolbar Shortcut     Character Blocking Mode      Line Blocking Mode m    Using the Windows Interface    Column Blocking Mode    Debug Menu    You use the Debug menu commands to access the commands used to debug your  GAUSS active file or main file program  A program run using the GAUSS debugger  is run in the Debug window  The Debug menu allows you to set breakpoints and watch  variables  The Debug menu contains the following entries     Toggle Debug Output Window    You use the Toggle Debug Output Window command to toggle between the Output  window and the Debug window     Keyboard Shortcut  Ctrl D    Debug Current File    You use the Debug Current File command to run the active file in the Debug  window  Prior to running the debugger  breakpoints can be set or cleared in the  active window at the cursor using the breakpoint set and clear commands   Watch variables can also be set prior to running the debugger     Debug Main File    You use the Debug Main File command to run the main file in the Debug window   Prior to running the debugger  breakpoints can be set o
169. s a local and then declared as a local procedure  or function later in the same procedure definition  This allows doing arithmetic on  local function pointers before calling them   For more information  see    Indexing  Procedures     page 6 9      Body of Procedure    The body of the procedure can have any GAUSS statements necessary to perform the  task the procedure is being written for  Other user defined functions and other  procedures can be referenced  as well as any global matrices and strings     GAUSS procedures are recursive  so the procedure can call itself as long as there is  logic in the procedure to prevent an infinite recursion  The process would otherwise  terminate with either an Insufficient workspace memory error message or  aProcedure calls too deep error message  depending on the space  necessary to store the locals for each separate invocation of the procedure     Returning from the Procedure    The return from the procedure is accomplished with the retp statement   retp     retp  expressionl expression2    expressionN       The retp statement can have multiple arguments  The number of items returned must  coincide with the number of rets in the proc statement     If the procedure is being defined with no items returned  the retp statement is  optional  The endp statement that ends the procedure will generate an implicit retp    6 4    Procedures and Keywords    with no objects returned  If the procedure returns one or more objects  there must be    an 
170. s in GAUSS take matrices as arguments  The  following functions and operators are used for defining  saving  and loading matrices         Indexing matrices     Assignment operator     Vertical concatenation       Horizontal concatenation    con Numeric input from keyboard    cons Character input from keyboard    declare Compile time matrix or string initialization   let Matrix definition statement    load Load matrix  same as 1oadm     readr Read from a GAUSS matrix or data set file   save Save matrices  procedures  and strings to disk   saved Convert a matrix to a GAUSS data set   stof Convert string to matrix    submat Extract a submatrix    writer Write data to a GAUSS data set     Following are some examples of matrix definition statements     An assignment statement followed by data enclosed in braces is an implicit let  statement  Only constants are allowed in let statements  operators are illegal  When  braces are used in let statements  commas are used to separate rows  The statement    let x     12 3  45 6  78 9       or    Using GAUSS for Windows95    x     12 3  45 6  7 8 9       will result in    123  X  456  789    The statement  let x 3 3   123 4567 8 9     will result in    123  X  456  789    The statement  let x 3 3    1     will result in    111  x  1 11  111    The statement  let x 3 3      will result in    000  x  000  000    4 10    Language Fundamentals    The statement  let x  1234567 8 9     will result in    e  II  OMNI DMN BRWN  e    Complex constan
171. s interpreted as     if every element of x is not equal to the corresponding element of y    To check if two matrices are not identical  use    if not x    y     For complex matrices  the              and      operators compare both the real and  imaginary parts of the matrices  all other relational operators compare only the real  parts     e Less than    Z  Xx  lt  y   z x lt y   z x   lt  y     e Less than or equal to  Z xS jy   z  x le y   z x   lt  y     e Equal to  z     y   Z x eq y   pass y    Using GAUSS for Windows95    e Not equal  z x    y   Z x ne y   z   x     y     e Greater than or equal to  z x2 y   Z x ge y   z x  2 y    e Greater than  Z Xx gt  y   zZ x gt y   z x   gt  y     If the relational operator IS preceded by a dot         the result will be a matrix of 1   s and  0   s  based upon an element by element comparison of x and y     e Element by element less than  Z  Xx   lt  y   z x 1t y   zZ x    lt  y    e Element by element less than or equal to  Z  X 3S Vj  z  yx   le y   z x   S y    e Element by element equal to  Z  Xx     y    Z  xXx  eq y   z  x      y   e Element by element not equal to    z x     y   z x  ne y   z x      y     5 10    Operators    e Element by element greater than or equal to  ZA A    x  ge y   z  x   2 y     VA    e Element by element greater than  Z X   gt  y   z x  gt y    x    gt  y     Z    Logical Operators    The logical operators perform logical or Boolean operations on numeric values  On  input  a nonzero value is co
172. s the Y axis  and  the third  if set  will control the Z axis  If 0  the axis will not be  drawn  Default is 1     If this is a scalar  it will be expanded to that value     13 15    Using GAUSS for Windows95    13 16    _paxht    _pbartyp    _pbarwid    _pbox    _pboxctl    For example     _paxes     1  0       turn X axis on         Y axis off     _paxes   0     turn all axes off       _paxes   1     turn all axes on       scalar  size of axes labels in inches  If 0  a default size will be  computed  Default is 0     global 1x2 or Kx2 matrix  Controls bar shading and colors in bar  graphs and histograms     The first column controls the bar shading     0  1  2  3  4  5  6    no shading   dots   vertical cross hatch   diagonal lines with positive slope  diagonal lines with negative slope  diagonal cross hatch   solid    The second column controls the bar color  see    Colors     page 10 12     global scalar  width of bars in bar graphs and histograms  The valid  range is 0 1  If this is 0  the bars will be a single pixel wide  If this is  1  the bars will touch each other  The default is 0 5  so the bars take up  about half the space open to them     scalar  draws a box  border  around the entire graph  Set to desired  color of box to be drawn  Use 0 if no box is desired  Default is 0     5x1 vector  controls box plot style  width  and color  Used by  procedure box only      1  box width between 0 and 1  If zero  the box plot is drawn    astwo vertical lines representing the
173. s would take one of the following forms   1  int func void      2  int func double  arg 1     double  2  etc           3  int func double  arg         Functions can be written to take a list of up to 100 arguments  or a vector  in C terms   a 1 dimensional array  of up to 1000 arguments  This does not affect how the function  is called from GAUSS  the dllcall statement will always appear to pass the arguments  in a list  That is  the dllcall statement will always look as follows     dilcall func  a b c d    e            For details on calling your function  passing arguments to it  getting data back  and  what the return value means  see dllcall in the GAUSS Language Reference     10 3    Data  Exchange    Data Exchange procedures are used to move data between GAUSS and other software  tools  Two procedures export GAUSS matrices and data sets to formats that can be  read by a variety of spreadsheets and databases  Two more procedures import data  files from these formats into GAUSS matrices and data sets     Formats Supported    The table below lists the spreadsheet and database formats supported  and their usual  file extensions  The default file type is determined from the file extension  This  default can be overwritten so that other file extensions can be used   For details  see     Global Variables     page 11 3      File Extension          File Type   Export Import  Lotus v1   v5  wks  Wks  wkl  wk5  Excel v2 1   v7 0   xls   xls  Quatro vl   v6  wql  wgl  wq2  wbl  Sym
174. s you have selected in the  Configure menu  Preferences  Files tab     Toolbar Shortcut      Keyboard Shortcut  CTRL N  Open    You use the Open command to open an existing file for viewing or editing  You can  enter or select the directory and filename in the Windows Open dialog box     Toolbar Shortcut       Keyboard Shortcut  CTRL O    Using GAUSS for Windows95    3 10    Reload    You use the Reload command to reload the document in the active window  allowing  you to remove all your changes since the last time you saved the file  You are  prompted to save the file if it has been modified since last saved  If you want to revert  to the last saved version  click No     Insert    You use the Insert command to open an existing text file and copy the contents into the  active document  This is similar to pasting text from the Windows clipboard     Close    You use the Close command to close the document in the active window  You are  prompted to save the file if it has been modified since you last saved it     Close All    You use the Close All command to close all open files  You are prompted to save any  file that has been modified since you last saved it     Save    You use the Save command to save your changes to the file in the active window  If  the file is untitled  you are prompted for a path and filename     Toolbar Shortcut   amp   Keyboard Shortcut  CTRL S JE    Save As    You use the Save As command to save your changes to the file in the active window  using a ne
175. ss srce tstprt g 2     The symbol prtvec could not be found  Check if the file containing prtvec is in  the src_path  You may not have activated the library that contains your symbol  definition  Do so ina library statement     c  gauss srec prt dec  3    Redefinition of  _ vnames    proc __vnames being declared external matrix    You are trying to illegally force a symbol to another type  You probably have a name  conflict that needs to be resolved by renaming one of the symbols     Using GAUSS for Windows95    c lgaussllibiprt lcg 5    error G0301      prt dec       Syntax error in library    Undefined symbols     __VNAMES c  gauss src prt src  6     Check your library to see that all filenames are flush left and all symbols defined in  that file are indented by at least one space     Using dec Files    When constructing your own library system     Whenever possible  declare variables in a file that contains only declare  statements  When your program is run again without clearing the workspace   the file containing the variable declarations will not be compiled and  declare warnings will be prevented     Provide a function containing regular assignment statements to reinitialize the  global variables in your program if they ever need to be reinitialized during or  between runs  Put this in a separate file from the declarations     proc  0    globset   _vname      X      _con   1   _row   0     _title            endp   Never declare a global in more than one file     To avo
176. statement  load x     will load the matrix x   fmt from disk  using the current load path  into the matrix x in  memory     The statement  open dl   datl   x   readr d1 100    will read the first 100 rows of the GAUSS data set dat 1 dat     Strings and String Arrays    4 14    Strings    Strings can be used to store the names of files to be opened  messages to be printed   entire files  or whatever else you might need  Any byte value is legal in a string from  0 255  The buffer where a string is stored always contains a terminating byte of ASCII  0  This allows passing strings as arguments to C functions through the Foreign  Language Interface     Here is a partial list of the functions for manipulating strings        Combine two strings into one long string    f Interpret following name as a variable  not a literal   chrs Convert vector of ASCII codes to character string   ftocv Character representation of numbers in NXK matrix   ftos Character representation of numbers in 1x1 matrix   getf Load ASCII or binary file into string    indcv Find index of element in character vector    lower Convert to lowercase    stof Convert string to floating point    strindx Find index of a string within a second string   strlen Length of a string    strsect Extract substring of string    upper Convert to uppercase    vals Convert from string to numeric vector of ASCII codes     Language Fundamentals    Strings can be created like this     x      example string      or  x   cons     keyboard
177. stid recsum voom     endata     GAUSS translates the data loop into a procedure that performs the required  operations  and then calls the procedure automatically at the location  in your  program  of the data loop  It does this by translating your main program file into a  temporary file and then executing the temporary file     A data loop may be placed only in the main program file  Data loops in files that are   include   d or autoloaded are not recognized     12 1    Using GAUSS for Windows95    Using Data Loop Statements    A data loop begins with a dataloop statement and ends with an endata statement   Inside a data loop  the following statements are supported     code Create variable based on a set of logical expressions   delete Delete rows  observations  based on a logical expression   drop Specify variables NOT to be written to data set    extern Allows access to matrices and strings in memory    keep Specify variables to be written to output data set    lag Lag variables a number of periods     listwise Controls deletion of missing values     make Create new variable    outtyp Specify output file precision    recode Change variable based on a set of logical expressions   select Select rows  observations  based on a logical expression   vector Create new variable from a scalar returning expression     In any expression inside a data loop  all text symbols not immediately followed by a  left parenthesis         are assumed to be data set variable  column  names  Tex
178. t addressed element to the  highest addressed element      real part   1 1   1 2   1 3   2 1   2 2   2 3    imaginary part   1 1   1 2   1 3   2 1   2 2   2 3     Extended Matrix v89  Obsolete     Matrices with more than 8190 elements are saved in an extended format  These files  have a 16 byte header formatted as follows     Offset Description       0 1 EEDD hex  identification flag   2 3 type of file  0086 hex for real matrices  8086 hex for complex matrices  4 7 rows  unsigned 4 byte integer   8 11 columns  unsigned 4 byte integer    12 15 size of file minus 16 byte header  unsigned 4 byte integer    The size of the body of an extended matrix file is 8 rows cols  not rounded up to a  paragraph boundary   Aside from this  the body is the same as the small matrix v89  file     Small String v89  Obsolete     String files are created with save  String files with up to 65519 characters have a 16   byte header formatted as follows     Offset Description  0 1 DFDF hex  identification flag       2 3 1  unsigned 2 byte integer    9 13    Using GAUSS for Windows95    Offset Description       4 5 length of string plus null byte  unsigned 2 byte integer  6 7 size of file minus 16 byte header  unsigned 2 byte integer  8 9 001D hex  type of file    10 15 reserved  all 0   s    The body of the file starts at offset 16  It consists of the string terminated with a null  byte  The size of the file is the 16 byte header plus the length of the string and null  byte rounded up to the next 16 b
179. t does not initialize  set to a value  the local variables  If they are  not passed in as parameters  they must be assigned some value before they are  accessed or the program will terminate witha Variable not initialized  error message     6 3    Using GAUSS for Windows95    All local and global variables are dynamically allocated and sized automatically  during execution  Local variables  including those that were passed as parameters  can  change in size during the execution of the procedure     Local variables exist only when the procedure is executing  and then disappear  Local  variables cannot be listed with the show command     The maximum number of locals is limited by stack space and the size of workspace  memory  The limiting factor applies to the total number of active local symbols at any  one time during execution  If cat has 10 locals and it calls dog which has 20 locals   there are 30 active locals whenever cat is called     There can be multiple Local statements in a procedure  They will affect only the  code in the procedure that follows  Therefore  for example  it is possible to refer to a  global x in a procedure and follow that with a local statement that declares a local  x  All subsequent references to x would be to the local x   This is not good  programming practice  but it demonstrates the principle that the local statement  affects only the code that is physically below it in the procedure definition   Another  example is a symbol that is declared a
180. t symbols  followed by a left parenthesis are assumed to be procedure names  Any symbol listed  in an extern statement is assumed to be a matrix or string already in memory     Using Other Statements    All program statements in the main file and not inside a data loop are passed through  to the temporary file without modification  Program statements within a data loop that  are preceded by a    ff    are passed through to the temporary file without modification   The user familiar with the code generated in the temporary file can use this to do out   of the ordinary operations inside the data loop     Debugging Data Loops    12 2    The translator that processes data loops can be turned on and off  When the translator  is on  there are three distinct phases in running a program     Translation Translation of main program file to temporary file   Compilation   Compilation of temporary file   Execution Execution of compiled code     Data Transformations    Translation Phase    In the translation phase  the main program file is translated into a temporary file  Each  data loop is translated into a procedure  and a call to this procedure is placed in the  temporary file at the same location as the original data loop  The data loop itself is  commented out in the temporary file  All data loop procedures are placed at the end of  the temporary file     Depending on the status of line number tracking  error messages encountered in this  phase will be printed with the file name and 
181. t that LIBLIST  processes the  1cg files in the order they appear in the 1ib_path subdirectory   whereas GAUSS processes libraries according to the order specified in your  library statement  LIBLIST assumes that all of your libraries are active  that is   you have listed them all in a library statement  gauss   1cg will be listed last     Here is an exampe of a listing           Symbol Type File Library Path  1  autoreg        autoreg  src auto lcg   gauss sre  2  autoprt         autoreg  src auto lcg   gauss sre  3  autoset          autoreg  src auto lcg   gauss sre  4  _pticout matrix pgraph  dec pgraph lcg   gauss sre  5  _pzlabel string pgraph  dec pgraph lcg   gauss sre  6  _pzpmax matrix pgraph  dec pgraph lcg   gauss sre  7  asclabel proc pgraph  Ssrc pgraph lcg   gauss srce  8  fonts proc pgraph  src pgraph lcg   gauss sre  9  graphset proc pgraph  src pgraph lcg   gauss sre  10  _svdtol matrix svd  dec gauss lcg   gauss sre  12  _maxvec matrix system  dec gauss lcg   gauss sre  13  besselj proc bessel  src gauss lcg   gauss srce  14  bessely proc bessel  src gauss lcg   gauss sre    Utilities    Symbol is the symbol name available to the autoloader     Type is the symbol type  If the library is not strongly typed  this will be a line of  dashes     File is the file the symbol is supposed to be defined in   Library is the name of the library  if any  the symbol is listed in   Path is the path the file is located on  If the file cannot be found  the path will be      
182. tals    The procedure isinf will return 1  true  if the matrix passed to it contains any  infinities     proc isinf x         local plus minus        plus   __INFp        minus   __INFn   retp not x    plus or not x    minus      endp     Be sure to call gausset before calling isinf  gausset will initialize the value of  the globals __INF n and __ INF p to platform specific encodings   Operator Precedence    The order in which an expression is evaluated is determined by the precedence of the  operators involved and the order in which they are used  For example  the   and    operators have a higher precedence than the   and     operators  In expressions that  contain these operators  the operand pairs associated with the   or   operator are  evaluated first  Whether   or   is evaluated first depends on which comes first in the  particular expression   For a listing of the precedence of all operators  see    Operator  Precedence     page 5 18      The expression     5 3 4 6 3  is evaluated as      5     3 4     6 3     Within a term  operators of equal precedence are evaluated from left to right   The term   DO ROL  is evaluated as    3 7     2       4 21    Using GAUSS for Windows95    In the expression      1  x     2  y     1 is evaluated before   2     Here are some examples     Expression    Evaluation       atb ct d   2 4 6 inv 8  9  3 14 5 6   2 sqrt  3  4    a b c   2   a b c d e   a beexd   a b d c   a b c d   2 4     LED    Flow Control    4 22     a   bx c   d    2  
183. tement will  produce the least squares solutions by forming the normal equations and  using the Cholesky decomposition to get the solution     _ Ab  EA  If trap 2 is set  missing values will be handled with pairwise deletion     Modulo division   yY xX   Z   For integers  this returns the integer value that is the remainder of the integer  division of x by z  If x or z is noninteger  it will first be rounded to the nearest  integer  This is an element by element operator   Factorial   y   x      Computes the factorial of every element in the matrix x  Nonintegers are  rounded to the nearest integer before the factorial operator is applied  This will  not work with complex matrices  If x is complex  a fatal error will be generated     Element by element multiplication  yer    Z     If x is a column vector and z is a row vector  or vice versa   the    outer product     or    table    of the two will be computed   For conformability rules  see    Element   by Element Operators     page 5 1      Using GAUSS for Windows95        Element by element division    y x  2z   Element by element exponentiation  y   x z   If x is negative  z must be an integer     Same as        Kronecker  tensor  product    y x     Z     This results in a matrix in which every element in x has been multiplied  scalar  multiplication  by the matrix z  For example     x    1 2   3 4     z   4 5 6     T 8 9 te  YuxX     Zi  12  x    3 4  456  r  789  4 5 6 8 1012  _ 7 8 9 141618  y      12 15 18 16 20 24  21
184. ter  5 region character    The output file will have four columns since the first column of the input file  race  is  not included in the output variables  The columns of the output file will be        column name data type  1 region Character  2 AGE numeric  3 sex character  4 PAY numeric    Utilities    The variable names are saved in the file header  Unless preservecase has been  specified  the names of character variables will be saved in lower case  and the names  of numeric variables will be saved in upper case  The   in the invar statement  specifies that the variables that follow are character type  The   specifies numeric  If    or   are not used in an invar statement  the default is numeric     Comments in command files must be enclosed between    A    characters     Commands  A detailed explanation of each of the ATOG commands follows     append  Instructs ATOG to append the converted data to an existing data set   append     No assumptions are made regarding the format of the existing file  Make certain the  number  order  and type of data converted match the existing file  ATOG creates v96  format data files  so will only append to v96 format data files     complex  Instructs ATOG to convert the ASCII file into a complex GAUSS data set     complex     Complex GAUSS data sets are stored by rows  with the real and imaginary parts  interleaved  element by element  ATOG assumes the same structure for the ASCII  input file  and will thus read TWO numbers out for EACH 
185. tervening  operand     G0065 Division by zero     G0066 Must be recompiled under current version    You are attempting to use compiled code from a previous version of GAUSS   Recompile the source code under the current version     G0068 Program compiled under GAUSS 386 real version    G0069 Program compiled under GAUSS 386i complex version    G0070 Procedure calls too deep    You may have a runaway recursive procedure     Error Messages    G0071 Type mismatch    You are using a string where a matrix is called for  or vice versa     G0072 Too many files open    The limit on simultaneously open files is 10     G0073 Redefinition of    G0074    G0075    G0076    G0077    G0078    G0079    G0080    G0081    G0082    declare An attempt has been made to initialize a variable that is already  initialized  This is an error when declare   isused  declare   or  declare    may be a better choice for your application     declare An attempt has been made to redefine a string as a matrix or  procedure  or vice versa  delete the symbol and try again  If this happens in  the context of a single program  you have a programming error  If this is a  conflict between different programs  use a new statement before running the  second program     let A string is being forced to type matrix  Use an external  matrix  symbol   statement before the let statement     Can t run program compiled under GAUSS Light    gscroll input vector the wrong size    Call Aptech Systems Technical Support    New size 
186. tion      The  define statement can be used to define abstract constants  For example  you  could define the default graphics page size as     define hpage 9 0        define vpage 6 855    and then write your program using hpage and vpage  GAUSS will replace them  with 9 0 and 6 855 when it compiles the program  This makes a program much  more readable     The  ifdef  else  endif directives allow you to conditionally compile sections  of a program  depending on whether a particular flag variable has been  define   d   For example      ifdef log_10  y   log x     else  y   1n x    fendif    This allows the same program to calculate answers using different base logarithms   depending on whether or not the program has a define log_10 statement at the  top     ttundef allows you to undefine text replacement or flag variables so they no longer  affect a program  or so you can define them again with a different value for a  different section of the program  If you use  definecs to define a case sensitive  variable  you must use the right case when  unde   f ing it     With  lineson   linesoff   srcline  and  srcfile you can include line  number and file name records in your compiled code  so that run time errors will be    4 5    Using GAUSS for Windows95    easier to track down   srcline and  srcfile are currently used by GAUSS  when doing data loop translation     For more information on line number tracking  see    Debugging     page 8 2 and see     Debugging Data Loops     page
187. title characters in inches  If this is 0  a default  height of approx  0 13 inch will be used    string  the graphics version number    scalar  the maximum number of places to the right of the decimal  point for the X axis numbers  Default is 12    scalar  the threshold in digits above which the data for the X axis will  be scaled and a power of 10 scaling factor displayed  Default is 4   scalar  the maximum number of places to the right of the decimal  point for the Y axis numbers  Default is 12    scalar  the threshold in digits above which the data for the Y axis will  be scaled and a power of 10 scaling factor displayed  Default is 4   scalar  row vector  or Kx2 matrix  Z level color control for procedures  surface and contour   See surface in the GAUSS Language  Reference     1x3 row vector  magnifies the graphics display for zooming in on  detailed areas of the graph  If scalar 0  default   no magnification is  performed      1  magnification value  1 is normal size    2  horizontal center of zoomed plot  0 100     3  vertical center of zoomed plot  0 100      To see the upper left quarter of the window magnified 2 times  use  _pzoom     2 25 75      scalar  the maximum number of places to the right of the decimal   point for the Z axis numbers  Default is 3     scalar  the threshold in digits above which the data for the Z axis will  be scaled and a power of 10 scaling factor displayed  Default is 4     13 27    Utilities    ATOG    ATOG is a stand alone conversion uti
188. to delete all text in the active window     Select All    You use the Select All command to select all text in the active window     Insert Time Date    You use the Insert Time Date command to insert the current time and date at the  cursor  GAUSS uses the time and date that appears in the Microsoft Windows Date   Time Properties window     Insert Symbol    You use the Insert Symbol command to paste ASCII and other special characters into  the active window at the cursor     Note  Generally  you can enter ASCII numerical codes by pressing ALT and entering  the digits using the keypad  not the number keys at the top of the keyboard   The  character is displayed when you release the ALT key     Also  depending on how your system is set up  you may be required to enter one or  two leading zeros so all entries are three or four digits in length  For example  for  ASCII character  40   you may have to enter  040  or  0040      Record Macro    Macros permit you to automate a series of keystrokes to save time and reduce errors   You create a macro by selecting Record Macro  pressing those keystrokes you want  recorded  and selecting Stop Record Macro to end the recording  Use the following  guidelines when creating and using your macro     e Only keystrokes in the active window are recorded  not keystrokes in a dialog  box     e Only keystrokes are recorded  not mouse movements   e You can record only one macro and it is not saved when you close GAUSS       When you create a new mac
189. to the 3rd matrix listed in mvec and return a 1  if successful or a 0 if it fails     Arrays of Procedures    4 32    It is also possible to index procedures  The ampersand operator   amp   is used to return a  pointer to a procedure     Assume that   1    2  and   3 are procedures that take a single argument  The  following code defines a procedure   i that will return the value of the ith procedure   evaluated at x     nms    amp f1    amp f2    amp   3     proc fi x i    local f   f   nms il   local f proc   retp  f x        endp     fi  x 2  will return   2  x   The ampersand is used to return the pointers to the  procedures  nms is a numeric vector that contains a set of pointers  The local  statement is used twice  The first tells the compiler that    is a local matrix  The   th  pointer  which is just a number  is assigned to     The second local statement tells  the compiler to treat    as a procedure from this point on  thus the subsequent  statement     x  is interpreted as a procedure call     Operators    Element by Element Operators    Element by element operators share common rules of conformability  Some functions  that have two arguments also operate according to the same rules     Element by element operators handle those situations in which matrices are not  conformable according to standard rules of matrix algebra  When a matrix is said to be  EXE conformable  it refers to this element by element conformability  The following  cases are supported     matrix
190. ts can be entered in a let statement  In the following example  the    or   is not a mathematical operator  but connects the two parts of a complex number   There should be no spaces between the   or   and the parts of the number  If a number  has both real and imaginary parts  the trailing    i    is not necessary  If a number has no  real part  you can indicate that it is imaginary by appending the    i     The statement    let x 2 2    1 2i 3 4 5 61        will result in    14 2i3 4i  5 046i    Complex constants can also be used with the declare  con  and stof statements     An    empty matrix    is a matrix that contains no data  Empty matrices are created with  the let statement and braces     x          Using GAUSS for Windows95    Empty matrices are currently supported only by the rows and cols functions and the  concatenation operators    and        x        hsecO   hsec    do until hsec hsecO  gt  6000   X  x   data_in hsec hsecO      endo     You can test whether a matrix is empty by entering rows  x   cols  x   and  scalerr  x   If the matrix is empty  rows and cols will return a 0  and scalerr  will return 65535     The   is the horizontal concatenation operator and the   is the vertical concatenation  operator  The statement    y   1 2 3 4   will be evaluated as  y    1 2 8 4    and will result in a 2x2 matrix because horizontal concatenation has precedence over    vertical concatenation     12  34    The statement    y   1 1 2 2 3 2 6 2        will be evaluated 
191. ty 4 11  maxvec 16 2   missing values 5 5  5 9  modulo division 5 5  msym 14 9   msym  atog command 14 2  multiplication 5 4    N       NaN 4 19   NaN  testing for 4 20  5 9   ne 5 10    ne 5 10   nocheck 14 9   nocheck  atog command 14 2  nodata 14 9   nodata  atog command 14 2  nonexecutable statement 4 2  nontransparent windows 13 7  not 5 9  5 11  5 12  5 19   not 5 13    O       operators 4 1  5 4   or 5 12  5 13   outer product 5 5   output 9 2  9 4  14 10  output  atog command 14 2  outtyp 12 2  14 10   outtyp  atog command 14 2  outvar 14 11   outvar  atog command 14 2  overlapping windows 13 7    P       packed ASCII files 14 7  pagesiz 13 12   pairwise deletion 5 5   passing to other procedures 6 7  performance hints 16 1  pointer 5 14  6 4   pointer  instruction 4 2    Index 4    precedence 4 21  5 18  operator 5 18  preservecase 14 11  proc 6 2  procedure 6 2  procedure definition 4 3   procedures 6 2  saving 6 12  indexing 6 9  multiple returns 6 10  program 4 3    Q       quit 14 11  quit  atog command 14 2       R  radii 13 20  recode 12 2    recursion 6 4   relational operator 5 8  5 10  relational operator  dot 5 18  reserved words B 1   retp 6 2  6 4   right hand side 7 2   rules of syntax 4 28   run 14 12   run  atog command 14 2    S       save 14 12  save  atog command 14 2  screen 9 4  secondary section 4 4  select 12 2  semicolon 4 2  singularity tolerance C 1  soft delimited 14 4  spaces 5 14  extraneous 4 29  5 14  src_path 7 1  14 17  16 1  startup f
192. u cannot  write rows from a complex matrix to a real data set     there is no way to interleave the  data without rewriting the entire data set  If you must  explicitly convert the rows of  data first  using the real and imag functions  see the GAUSS Language Reference    and then write them to the data set  Rows from a real matrix CAN be written to a  complex data set  GAUSS simply supplies 0   s for the imaginary part     To create a complex data set  include the complex flag in your create command     Reading and Writing  The basic functions in GAUSS for reading data files are open and readr   open f1   datl     x   readr f1 100      The readr function in the example will read in 100 rows from dat 1 dat  The data  will be assigned to a matrix x     loadd and saved can be used for loading and saving small data sets     9 7    Using GAUSS for Windows95    9 8    The following example illustrates the creation of a GAUSS data file by merging   horizontally concatenating  two existing data sets     filel      dat1      file2      dat2      outfile      daty        open finl    filel for read     ll    open fin2    file2 for read     varnames   getname filel   getname file2            otyp   maxc  typef  fin1   typef fin2     create fout      outfile with    varnames 0 otyp   nr   400     do until eof finl  or eof fin2      yl   readr finl nr     y2   readr fin2 nr     r   maxc  rows  yl   rows y2     yous svi  leery  os ye bb  sly    call writer fout y    endo     closeall finl
193. uires GAUSS be restarted to make the new settings effective     You use the Output focus control to specify whether the focus follows the program  output  When set to Yes  the focus changes to the Output window for Split I O or  Command for Cmnd mode when the program generates text output  When set to No   the focus does not change  The default setting is no output focus     Files Tab    You can select Auto Backup to automatically create a backup copy of all open  documents that have a file name  The backup file is created in the same directory at  the interval you specify  using a  BAK  file name extension  If the original document  has a BAK extension  the backup uses a BK 1 extension  The default is no auto  backup     Note  New  unsaved documents are not automatically backed up until you save them   giving them a file name  After you save the new file  it will be automatically backed  up will all other open files     You can select Prompt to save untitled to have GAUSS warn you when exiting if there  are any files that have neither been loaded nor saved   Untitled   files   The default is  on     The Auto Save on Execute section allows you to specify when files are saved if they  are edited or executed     e Executed file  If the file you are running is loaded  it will be saved prior to  execution  regardless of how it is executed  Run file  command line  main file  or  active file   This option is checked by default     e Active file  The active edit file is saved whethe
194. ull     G0174       and       operators must be inside    brackets    These operators are for indexing matrices     G0175 String too long to compare    G0176 Argument out of range    G0177 Invalid format string    G0178 Invalid mode for getf    G0179 Insufficient heap space    G0180 trim too much    You are attempting to trim more rows than the matrix has     G0181 Illegal assignment   type mismatch    15 14    Error Messages    G0182 2nd and 3rd arguments different order    G0274 Invalid parameter for conv    G0275 Parameter is NaN  Not A Number     The argument is a NaN  see    Special Data Types     page 5 19      G0276 Illegal use of reserved word  G0277 Null string illegal here  G0278 proc without endp    You must terminate a procedure definition with an endp statement     G0286 Multiple assign out of memory    G0287 Seed not updated    The seed argument to rndns and rndus must be a simple local or global  variable reference  It cannot be an expression or constant     G0288 Found break not in do loop    G0289 Found continue not in do loop    G0290 Library not found    The specified library cannot be found on the lib_path path  Make sure  installation was correct     G0291 Compiler pass out of memory    Notify Aptech Systems     G0292 File listed in library not found    A file listed in a library could not be opened     15 15    Using GAUSS for Windows95    15 16    G0293 Procedure has no definition    The procedure was not initialized  Define it     G0294 Error opening t
195. ultiple document interface you  can customize  The interface supports Command and Edit windows for sending  queries to GAUSS and an Output window for receiving output from GAUSS  The  editor allows you to choose fonts  colors and keystrokes  and supports split screens   bookmarks and macros  Graphics are also supported     Included with this version of GAUSS is a full debugger with breakpoints and watch  variables  context sensitive help  and a source browser     GAUSS Windows    Description    GAUSS uses six types of windows  a Command window  an Edit window  an Output  window  a Debug window  a Matrix Editor window  and an HTML based Help  window     3 1    Using GAUSS for Windows95    Command Window    You enter interactive commands in the Command window  This window can be  selected from the Windows menu or from the Status bar  Output in Cmnd I O mode  will be written to the Command window     Edit Window    An Edit window is created when you open a file  When you execute GAUSS from an  Edit window  the entire file is executed  This is the equivalent of the GAUSS  run  filename  statement     If more than one file is loaded  the last file loaded or executed becomes the active file  when you click the Edit status on the Status bar  Repeated clicking of the Edit status  cycles through all loaded Edit windows     Output Window    Output is written to the Output window in Split I O Output mode  GAUSS commands  cannot be executed from this window     Debug Window    This windo
196. used inside the  procedure in the usual way    1 will be interpreted as a procedure inside myproc  and    2 will be interpreted as a function  The call to myproc is made as follows     k   myproc    amp max  amp lgsgqrt 5 7      log of square root  of 7  xy              myproc  amp min   amp lgsqrt 5 7      log of square root  of 5  ay     The ampersand   amp   in front of the function or procedure name in the call to myproc  causes a pointer to the function or procedure to be passed  No argument list should  follow the name when it is preceded by the ampersand     Inside myproc  the symbol that is declared as a procedure in the Local statement is  assumed to contain a pointer to a procedure  It can be called exactly like a procedure is  called  It cannot be save   d  but it can be passed on to another procedure  If it is to be  passed on to another procedure  use the ampersand in the same way     Indexing Procedures    This example assumes there are a set of procedures named   1   5 that are already  defined  A 1x5 vector procvec is defined by horizontally concatenating pointers to  these procedures  A new procedure  g  x i  is then defined that will return the value of  the ith procedure evaluated at x     procvec    amp f1    amp f2    amp f3    amp f4    amp f5     proc g x 1    local f   f   procvecl i    local f proc   retp  f x        endp     Using GAUSS for Windows95    The Local statement is used twice  The first time     is declared to be a local matrix   After    
197. ut gosub    You have encountered a subroutine without executing a gosub   G0104 Argument must be positive  G0105 Bad expression or missing arguments   Check the expression in question  or you forgot an argument     G0106 Factorial overflow    G0107 Nesting too deep    Break the expression into smaller statements     G0108 Missing left bracket      G0109 Not enough data items    You omitted data in a let statement     15 9    Using GAUSS for Windows95    15 10    G0110 Found   expected        G0111 Found   expected        G0112 Matrix multiplication overflow    G0113 Unclosed      G0114 Unclosed      G0115 Illegal redefinition of function    You are attempting to turn a function into a matrix or string  If this is a name  conflict  delete the function     G0116 sysstate  invalid case    G0117 Invalid argument    G0118 Argument must be integer    File handles must be integral     G0120 Illegal type for save    G0121 Matrix not positive definite    The matrix is either not positive definite  or singular using the current  tolerance     G0122 Bad file handle    The file handle does not refer to an open file or is not in the valid range for file  handles     G0123 File handle not open    The file handle does not refer to an open file     Error Messages    G0124 readr call too large    You are attempting to read too much in one call     G0125 Read past end of file    You have already reached the end of the file     G0126 Error closing file    G0127 File not open for write    G0128 
198. variable specified   complex cannot be used with packed ASCII files    input    Specifies the file name of the ASCII file to be converted  The full path name can be  used in the file specification     For example  the command   input data raw   will expect an ASCII data file in the current working directory   The command   input c  research data myfile asc     specifies a file to be located in the c   research data subdirectory     14 3    Using GAUSS for Windows95    invar    Soft Delimited ASCII Files Soft delimited files may have spaces  commas  or cr If  as delimiters between elements  Two or more consecutive delimiters with no data  between them are treated as one delimiter  For example     invar age   name sex   pay var 1 10  x 005      The invar command above specifies the following variables        column name data type  1 AGE numeric  2 name character  3 sex character  4 PAY numeric  5 VARO1 numeric  6 VARO2 numeric  7 VARO3 numeric  8 VARO4 numeric  9 VARO5 numeric  10 VARO6 numeric  11 VARO    numeric  12 VARO8 numeric  13 VARO9 numeric  14 VAR10 numeric  15 X001 numeric  16 X002 numeric  17 X003 numeric  18 x004 numeric  19 x005 numeric    As the input file is translated  the first 19 elements will be interpreted as the first row   observation   the next 19 will be interpreted as the second row  and so on  If the    14 4    Utilities    number of elements in the file is not evenly divisible by 19  the final incomplete row  will be dropped and a warning message wil
199. w editing     When a window is split  a splitter bar appears between the two sides of the window  and is used to define where the window split is positioned  You can move the splitter  bar by dragging it with the mouse     Toolbar Shortcut     Split Horizontal    You use the Split Horizontally command to split the active window into two  horizontal panes  This allows you to view two different areas of the same document to  facilitate split window editing     When a window is split  a splitter bar appears between the upper and lower half of the  window and is used to define where the window split is positioned  You can move the  splitter bar by dragging it with the mouse     Toolbar Shortcut     Using GAUSS for Windows95    Help Menu    You use the Help menu to access the information in the GAUSS Help you are looking  for  The GAUSS Help menu contains the following entries     Contents    You use the Contents command to start the GAUSS Help system  Click on the  Contents tab to view a list of help topic categories  Use the Search tab to search fhe  help system by key word Click on the Index tab to view a list of all help topics in  alphabetical order     Keyboard  You use the Keyboard command to access the list of keystrokes you can use for cursor    movement  editing  and text selection  The keystrokes are the editor key functions     GAUSS Reference    You use the GAUSS Reference command to access the online GAUSS Language  Reference guide  The Guide contains the syntax for 
200. w is displayed during a debugging session  The other windows are still  accessible and you can toggle between the Output window and the Debug Window by  pressing Ctrl D  This window cannot be minimized nor closed once it is opened   Matrix Editor Window    You use this window to create or edit a matrix     HTML Based Help Window    This window is used to display HTML HELP pages and provide access to the Web     You can select the various child windows from the windows shown on the Windows  menu or by selecting the desired window by clicking on the status on the Status bar   You can toggle between the Command or Edit window and the Output window by  using pressing F5 or by clicking the Toggle Input Output window icon on the Toolbar     Keyboard Shortcut  F5    Running Commands    The GAUSS interface allows you to run programs that consist of single commands or  blocks of commands executed interactively as well as large scale programs that may  consist of commands in one or more files     3 2    Using the Windows Interface    Interactive commands can be entered at the      prompt in the Command window or  selected using the mouse and clicking the Run Marked Block button on the toolbar     GAUSS keeps track of two types of files  an Active file and a Main file  The Active  file is the file that is currently displayed  The Main file is the file that is executed to  run the current job or project     Summary  Mode Keys  Interactive commands Enter  Ctrl F2  Active File Ctrl F2  Mar
201. w or different path or file name  This can be a convenient method of  protecting your changes from later revisions and allows you to revert back one or  more generation of changes     Print    You use the print command to print the active file or selected text from the active  window     pa  Toolbar Shortcut     Using the Windows Interface    Keyboard Shortcut  CTRL P    Printer Setup    You use the Printer Setup command to specify the printer you want to use  Other  printer options  such as page orientation and paper tray  are also accessed with this  command     Change Working Directory    You use the Change Working Directory command to change the directory where  GAUSS looks for the files it uses for normal operation  This command does not affect  the Open or Save As paths     You use the Run command to run a file you select  The file is not displayed in a  window  The file then becomes the active main file     Exit    You use the Exit command to close all open files and exit GAUSS  You will be  prompted to save any file that has been modified since it was last saved     Keyboard Shortcut  CTRL Q or ALT F4    Recent Files    GAUSS maintains a list of the four most recent files you opened at the end of the File  menu  If the file you want to open is on this list  click on itand GAUSS opens it in an  Edit window     Edit Menu  You use the Edit Menu to access the set of editing commands  Some of these actions  can also be executed from the Toolbar  The Edit menu contains the 
202. will be expanded to a 9x1 vector   _pmsgctl Lx7 matrix of control information for printing the strings contained in    _pmsgstr    L 1  horizontal location of lower left corner of string    L  2  vertical location of lower left corner of string      L  3  character height in inches      L  4  angle in degrees to print string  This may be  180 to 180  relative to the positive X axis      L 5  location coordinate system   1 location of string in plot coordinates  2 location of string in inches    L  6  color  see    Colors     page 10 12      L  7  font thickness  may be zero or greater  If 0  use  normal line width     _pmsgstr string  contains a set of messages to be printed on the plot  Each  message is separated from the next with a null byte  1000    The  number of messages must correspond to the number of rows in the  _pmsgctl control matrix  This can be created as        _pmsgstr      Message one 1000Message two         13 24    _pnotify    _pnum    _pnumht    _protate    _pscreen    _psilent    _pstype    Publication Quality Graphics    scalar  controls window output during the creation of the graph    Default is 1    0 no activity to the window while writing  tkf file    1 display progress as fonts are loaded and  t kf file is  being generated     scalar  2x1 or 3x1 vector for independent control for axes numbering   The first element controls the X axis numbers  the second controls the  Y axis numbers  and the third  if set  controls the Z axis numbers   Default is 1 
203. wind 4 2 5 1 1 5 0      Nontransparent Graphic Panels    A nontransparent graphic panel is one that is blanked before graphics information is  written to it  Therefore  information in any previously drawn graphic panels that lie  under it will not be visible     Transparent Graphic Panels    A transparent graphic panel is one that is not blanked  allowing the graphic panel  beneath it to    show through     Lines  symbols  arrows  error bars  and other graphics  objects may extend from one graphic panel to the next by using transparent graphic  panels  First  create the desired graphic panel configuration  Then create a full   window  transparent graphic panel using the makewind or window command  Set  the appropriate global variables to position the desired object on the transparent  graphic panel  Use the draw procedure to draw it  This graphic panel will act as a  transparent    overlay    on top of the other graphic panels  Transparent graphic panels  can be used to add text or to superimpose one graphic panel on top of another     13 7    Using GAUSS for Windows95    Using Graphic Panel Functions  The following is a summary of the graphic panel functions     begwind Graphic panel initialization procedure    endwind End graphic panel manipulations  display graphs   window Partition window into tiled graphic panels   makewind Create graphic panel with specified size and position   setwind Set to specified graphic panel number    nextwind Set to next available graphic panel
204. window   After locating the text string  you can edit the text manually or replace the text with  what you have entered in the Search dialog box and selecting the  Replace with   command     The Find option locates the specified text in the active window from the cursor  position down  The search can be case sensitive or case insensitive  Subsequent  searches for the same text can be resumed by pressing F3     The Replace option locates the specified text in the active window and replaces it with  the text you entered in the  Replace with  field in the Search dialog box  The search  starts at the cursor position and continues to the end of the text in the active window   The search can be case sensitive or case insensitive  and the replacement can be  unique or global     Toolbar Shortcut   Keyboard Shortcut  CTRL F    Find Again    You use the Find Again command to resume the search for the next occurrence of the  text you specified in the previous Find action     LA  Toolbar Shortcut     Keyboard Shortcut  F3    Toggle Split Screen Mode    You use the Toggle Split Screen Mode commands to change the configuration of the  active window from one pane to two panes  split either vertically or horizontally   Splitting a window allows you to view two different areas of the same document to  facilitate split window editing       You use the No Split command to remove a split you made to the active window   You use either the Split Vertically or Split Horizontally commands to create
205. with illegal loop level    Failure opening printer for output    Failure buffering output for printer    Can t take log of a negative number    Attempt to index proc fn keyword as a matrix    Missing right brace      Unexpected end of statement    Too many data items    Negative trim value    15 21    Using GAUSS for Windows95    G0463 Failure generating graph    15 22    Maximizing 1 6  Performance    These hints will help you maximize the performance of your new GAUSS System     Library System    Some temporary files are created during the autoloading process  If you have a  tmp_path configuration variable or a tmp environment string that defines a path on  a RAM disk  the temporary files will be placed on the RAM disk     For example     set tmp f  tmp    tmp_path takes precedence over the tmp environment variable     A disk cache will also help  as well as having your frequently used files in the first  path in the src_path     You can optimize your library   1 cg files by putting the correct drive and path on each  file name listed in the library  The 1ib command will do this for you     Use the compile command to precompile your large frequently used programs  This  will completely eliminate compile time when the programs are rerun     16 1    Using GAUSS for Windows95    Loops    The use of the built in matrix operators and functions rather than do loops will ensure  that you are utilizing the potential of GAUSS     Here is an example   Given the vector x with 8000 nor
206. xportf Exports a GAUSS data set to a specified file format   import Imports a spreadsheet or database file to a GAUSS matrix   importf Imports a spreadsheet or database file to a GAUSS data set     For details  see the GAUSS Language Reference     Data Exchange    Global Variables    The following global variables can be used to modify the operation of the Data  Exchange procedures     _dxftype   string     _dxtype   matrix     _dxwidth   matrix     _dxprcn   matrix     _dxtxdlim   scalar     _dxaschdr    _dxwkshdr    _dxmiss    Overrides the file extension to define the type of file to import  or export  For example  after setting _dxftype    xls    files exported or imported will be Excel format  independent of  the actual file extension  Use _dxftype           empty string   to return to default operation  file extension defining file type      Scalar or Kx1 vector of 1 s and 0 s defining the data types of  columns  1 s indicate numeric columns  0 s indicate character  columns  A scalar can be used if all columns are of the same  type  Default is scalar 1  all numeric      Scalar or Kx1 vector of integers giving the width of spreadsheet  columns in characters  A scalar can be used if all columns have  the same width  Default is 12   _dxwidth does not always  control the column width correctly when exporting to an Excel    x1s  datasheet or databook  Adjust this parameter within  Excel after loading the file      Scalar or Kx1 vector defining the number of digits of precisi
207. y Element Operators     page 5 1     Each of these operators has two equivalent representations  Either can be used  for  example   lt  or 1t   depending only upon preference  The alphabetic form should be  surrounded by spaces     A third form of these operators has a        and is used for comparisons between  character data and for comparisons between strings or string arrays  The comparisons  are done byte by byte  starting with the lowest addressed byte of the elements being  compared     Operators    The equality comparison operators   lt        gt       and their dot equivalents can be used  to test for missing values and the NaN that is created by floating point exceptions   Less than and greater than comparisons are not meaningful with missings or NaN   s   but equal and not equal will be valid  These operators are sign insensitive for  missings  NaN   s  and zeros     The string       versions of these operators can also be used to test missings  NaN   s  and  zeros  Because they do a strict byte to byte comparison  they are sensitive to the sign  bit  Missings  NaN   s  and zeros can all have the sign bit set to 0 or 1  depending on  how they were generated and have been used in a program     If the relational operator is NOT preceded by a dot          the result is always a scalar 1  or 0  based upon a comparison of all elements of x and y  All comparisons must be true  for the relational operator to return TRUE     By this definition  then  if x    y            i
208. y in gauss cfg by setting dlib_path  As it is shipped  gauss cfg  specifies    GAUSSDIR    dlib as the default directory     Creating Dynamic Libraries    Assume you want to build a dynamic library called my funcs d11  containing the  functions found in two source files  myfuncl c and myfunc2 c  The following  sections show the compile and link commands you would use  The compiler  command is first  followed by the linker command  followed by remarks regarding  that platform     10 1    Using GAUSS for Windows95    10 2    For explanations of the various flags used  see the documentation for your compiler  and linker  One flag is common to both platforms  The    c compiler flag means     compile only  don t link     Virtually all compilers will perform the link phase  automatically unless you tell them not to  When building a dynamic library  we want  to compile the source code files to object   obj  files  then link the object files in a  separate phase into a dynamic library        CCOPTS  indicates any optional compilation flags you might add   cl  c   CCOPTS   DWIN32  D_WIN32  D_MT  c  W3                Dtry _try         Dexcept __except  Dleave __leav  Dfinally __finally       DCRTAPI1 _cdecl  DCRTAPI2 _cdecl  D_X86_ 1  DSTRICT              LD     Zp1 myfuncl c myfunc2 c   link  DLL  def ntgauss def  out myfuncs dll myfuncl obj     myfunc2 obj fp10 ob3  libecmt lib oldnames lib  kernel32 lib         advapi32 lib user32 1ib gdi32 1ib comdlg32 1lib  winspool lib  These com
209. ymbol it is trying to resolve  The library statement is used to make a  library active  Library files should be located in the subdirectory listed in the  lib_path configuration variable  Library files have a   1cg extension     Suppose you have several procedures that are all related and you want them all  defined in the same file  You can create such a file  and  with the help of a library  the  autoloader will be able to find the procedures defined in that file whenever they are  called     First  create the file to contain your desired procedure definitions  By convention  this  file is usually named with a   src extension  but you can use any name and any file  extension  In this file  put all the definitions of related procedures you wish to use   Here is an example of such a file  called norm  src               norm src       This is a file containing the definitions of three       procedures which return the norm of a matrix x        xx The three norms calculated are the one norm  the    Libraries       xx  inf norm and the E norm     aes    proc onenorm x     retp  maxc sumc abs x         endp     proc infnorm x     retp  maxc sumc abs x            endp     proc Enorm x     retp  sumc  sumc x  x        endp     Next  create a library file that contains the name of the file you want access to  and the  list of symbols defined in it  This can be done with the 1ib command   For details   see lib in the GAUSS Language Reference      A library file entry has a filename th
210. yte paragraph boundary     Extended String v89  Obsolete     Strings with more than 65519 characters are saved in an extended format  These files  have a 16 byte header formatted as follows     Offset Description       0 1 EEDF hex  identification flag  2 3 001D hex  type of file  4 7 1  unsigned 4 byte integer    8 11 length of string plus null byte  unsigned 4 byte integer  12 15 size of file minus 16 byte header  unsigned 4 byte integer  The body of the file starts at offset 16  It consists of the string terminated with a null    byte  The size of the file is the 16 byte header plus the length of the string and null  byte rounded up to the next 8 byte boundary     Small Data Set v89  Obsolete     9 14    All data sets are created with create  v89 data sets consist of two files  one    dht   contains the header information  the second    dat  contains the binary data  The data  will be one of three types     8 byte IEEE floating point  4 byte IEEE floating point  2 byte signed binary integer  twos complement    Numbers are stored row by row     File I O    The   dht file is used in conjunction with the   dat file as a descriptor file and as a  place to store names for the columns in the   dat file  Data sets with up to 8175  columns have a  dht file formatted as follows     Offset Description       0 1 DADA hex  identification flag   2 5 reserved  all 0   s   6 7 columns  unsigned 2 byte integer   8 9 row size in bytes  unsigned 2 byte integer    10 11 header size in bytes 
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
Patriot Memory PSF32GDUSB USB flash drive  Sony MDS-JE630 User's Manual  D-Link N450 User's Manual  GPS 安全性要約書(GSS) ジエチレングリコール  D-Link DIR-506L router  La librairie de l`écologie politique  Automatic Outdoor Ice Maker Máquina automática para hacer hielo      Copyright © All rights reserved. 
   Failed to retrieve file