Type: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
(Imported TYPE command page from old wiki)
 
(edit)
Line 1: Line 1:
The '''Type (TY)''' [[command]] sends the contents of a specified file to the screen, a printer, or another file.
The '''Type (TY)''' command sends the contents of a specified file to the screen, a printer, or another file.


==Comments and Examples==
==Comments and Examples==
[[Text files]] appear in a legible format when displayed with the Type command. The presence of non-alphabetic or non-numeric characters in other files -such as object program files -may make these files illegible, however wildcard characters are not allowed in the file name that specifies the TYPE command. The following example displays, one screen at a time, the contents of the file SAMPLE.ONE:
 
Text files appear in a legible format when displayed with the Type command. The presence of non-alphabetic or non-numeric characters in other files, such as object program files, may make these files illegible.
 
however wildcard characters are not allowed in the file name that specifies the TYPE command.  
 
The following example displays, one screen at a time, the contents of the file SAMPLE.ONE:


  TYPE B:SAMPLE.ONE -P
  TYPE B:SAMPLE.ONE -P
Line 11: Line 16:


==Syntax==
==Syntax==
[[Image:HELP0064.jpg]]
 
[[Image:Type.png]]


==Defaults==
==Defaults==
# Display the information on the screen.
# Display the information on the screen.
# Scroll entire contents of file without pausing.
# Scroll entire contents of file without pausing.


==Parameters==
==Parameters==
The TYPE command requires the '''file name''' parameter, which specifies which file the system should display on the screen or send to a printer or file.
The TYPE command requires the '''file name''' parameter, which specifies which file the system should display on the screen or send to a printer or file.


The optional '''>file name''' parameter (with the redirection arrow) indicates the file or device to which the contents of the specified file should be sent. One redirection arrow causes the information to be written over any data that previously existed in the file. Two redirection arrows (>>) causes the information to be appended to the end of the file.
The optional '''>redirected output file''' parameter indicates the file or device to which the contents of the specified file should be sent. One redirection arrow causes the information to be written over any data that previously existed in the file. Two redirection arrows '''>>''' causes the information to be appended to the end of the file.


'''PRINT''', which operates the same as >PRN:, sends the contents of the specified file to a printer rather than to the screen.
'''PRINT''', which operates the same as '''>PRN:''', sends the contents of the specified file to a printer rather than to the screen.


Note- TYPE PRINT does not utilize printer substitutions, but Ctrl-P does.
'''Note''' that TYPE PRINT does not utilize printer substitutions, but Ctrl-P does.


The '''-P''' option causes scrolling to pause after the typed contents of the file fills one screen.
The '''-P''' option causes scrolling to pause after the typed contents of the file fills one screen.


==Comments==
==Comments==
# TYPE now works on locked files.
# TYPE now works on locked files.
# TYPE PRINT no longer inserts carriage returns in long print lines, unless they are going to the screen. This was fixed earlier for files. Now it is fixed for typing to printers as well.
# TYPE PRINT no longer inserts carriage returns in long print lines, unless they are going to the screen. This was fixed earlier for files. Now it is fixed for typing to printers as well.


{\b TYPE COMMAND REVISIONS}
'''Note''' that TYPE skips the header portion of Internal files)
 
The TYPE command was reviewed and revised under various scenarios:
[NEWCELL(icells4.spc)]
 
 
|}
(only honor ^Z only when concatenating files )|||
 
|}
(note- TYPE skips the header portion of Internal files)
 
 


<noinclude>
<noinclude>

Revision as of 14:22, 26 December 2011

The Type (TY) command sends the contents of a specified file to the screen, a printer, or another file.

Comments and Examples

Text files appear in a legible format when displayed with the Type command. The presence of non-alphabetic or non-numeric characters in other files, such as object program files, may make these files illegible.

however wildcard characters are not allowed in the file name that specifies the TYPE command.

The following example displays, one screen at a time, the contents of the file SAMPLE.ONE:

TYPE B:SAMPLE.ONE -P

The next command sends the same contents to a printer:

TYPE B:SAMPLE.ONE PRINT

Syntax

Defaults

  1. Display the information on the screen.
  2. Scroll entire contents of file without pausing.

Parameters

The TYPE command requires the file name parameter, which specifies which file the system should display on the screen or send to a printer or file.

The optional >redirected output file parameter indicates the file or device to which the contents of the specified file should be sent. One redirection arrow causes the information to be written over any data that previously existed in the file. Two redirection arrows >> causes the information to be appended to the end of the file.

PRINT, which operates the same as >PRN:, sends the contents of the specified file to a printer rather than to the screen.

Note that TYPE PRINT does not utilize printer substitutions, but Ctrl-P does.

The -P option causes scrolling to pause after the typed contents of the file fills one screen.

Comments

  1. TYPE now works on locked files.
  2. TYPE PRINT no longer inserts carriage returns in long print lines, unless they are going to the screen. This was fixed earlier for files. Now it is fixed for typing to printers as well.

Note that TYPE skips the header portion of Internal files)