Skip to main content
MedCalc
Mail a PDF copy of this page to:
(Your email address will not be added to a mailing list)
working
Show menu Show menu

Scripts - Display commands

Beep

Beep generates a computer beep (if sound is on).

Cls

Cls clears the content of the output frame.

Echo

Echo ON | OFF turns on or off the command echoing feature. If used without parameters, Echo displays the current echo setting.

Print

Print(foo) or ?foo prints the value or variable foo in the output window.

In the text to print, you can include a new line code "\n" or tab code "\t".

You can print different values or strings using one single print command. The different items need to be separated with the list separator. If the list separator is a comma, you can write:

print("mean ",25);

In most cases, you can omit the brackets and write:

print "mean : ",25;

You cannot omit the brackets when

  • you list several items to print and the list separator on your PC is a semicolon
    print("mean : ";25);
    
  • the first argument is a formula that itself starts with a bracket:
    print((2*5)+1);
    

You can specify the number of decimals by adding :n to the item. For example, print(25.6123:2) will print 25.61. This works for real numbers, complex numbers and matrices.

For numbers, you can additionally specify the minimum length of the output by adding another :n to the number. For example, print(25.612:2:10) will print      25.61 (the number is left-padded with 5 spaces).

PrintLn

PrintLn advances the cursor in the output frame to the next line.

PrintLn is like print "\n" (see Print above).

Formatting text

Text bold, italic and underline text effects can be used text for typographical emphasis of output in the output frame, by inserting the following tags in the output:

<b>bold
</b>end bold text
<u>underline
</u>end underlining
<i>italic
</i>end italic
<sup>superscript
</sup>end superscript
<sub>subscript
</sub>end subscript

See also