This example shows how the sum \(1+1\) can be computed and printed to the standard output—i.e. the screen—in a variety of ways.
scanf-type format specifier. The default format is
%e (see the C library reference for
scanf for details). The last format specifier given is used to render each expression. New
PRINT 1+1 # with default format PRINT %g 1+1 # with numeric format # by means of an intermediate variable a = 1+1 PRINT %g a # with an informative text PRINT "Peano says that one plus one equals" %.0f a
$ wasora peano.was 2.000000e+00 2 2 Peano says that one plus one equals 2 $