Jump to content

Terminal control/Clear the screen: Difference between revisions

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.
Example works for both Icon and Unicon.
 
<lang Icon>procedure main ()
if &features == "MS Windows" then system("cls") # Windows
procedure main ()
else if &features == "UNIX" then system("clear") # Unix
system ("clear") # 'clear' works under Linux
end</lang>
</lang>
 
=={{header|J}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.