Write statement in a Gauss code


I was given a code that has different version of the following in several parts of it:

if write;
   format /rd 8,4;
   "mean reversion matrix phi (feedback form)" inv(sigma)*phi*sigma;
   "conditional factor variance" (dscale^2)*condvar; 
   "unconditional factor variance" (dscale^2)*ucondvar; 

and also "write" is included as an input in the procedure where this commands are included.

I'm not really sure if this is used just to print results or for something else.

Can you help me with this?

Thanks in advance.

2 Answers


Many thanks!


In GAUSS, statement evaluations that are not assigned to anything are implicit print statements. For example, the statement:

print 5+5;

and the statement:


will both print the result of the expression, which in this case is 10. You can add strings on the same line as these print statements (implicit or explicit) and they will also print. For example:

print "Five plus five = " 5+5;

will return:

Five plus five = 10.000

The code snippet you provided contains only these types of print statements, there are no assignments. Your guess is correct that it is just printing results.

Since write is an input to a procedure, it is most likely just a scalar value that turns these print statements on and off.

You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 14 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy