Anonymous user
Terminal control/Clear the screen: Difference between revisions
→{{header|Icon}} and {{header|Unicon}}: windows too
(→{{header|Icon}} and {{header|Unicon}}: windows too) |
|||
Line 40:
=={{header|Icon}} and {{header|Unicon}}==
Example works for both Icon and Unicon. Determine which system command to call by querying &features at run time. Alternately, the related preprocessor symbols can be used to select the operating system.
<lang Icon>procedure main ()
if &features == "MS Windows" then system("cls") # Windows
else if &features == "UNIX" then system("clear") # Unix
end</lang>
=={{header|J}}==
|