PROGRAM SWrite;
{ SWrite for the String package.

Version: 3.2
File:[22,310]SWRITE.PAS
Author: Jim Bostwick 26-Aug-83

Last Edit:  23-JUN-1988 22:33:18 

History: 
	 23-JUN-1988 21:59:57  - JMB PA3UTL upgrade.
         15-Apr-88 PTH -- refix bug where full type1 string would run
                          off end.  Also use SLEN to validate string
                          and determine length.
  	 12-Mar-84 JMB -- fix bug with exactly full type 1 string
  			  (we would run off the end )
	 29-Nov-83 JMB -- convert to null-fill of type 1 strings
  			  only write out 'used' length of type 1

  		**NOTE** 
This module is COPYWRITED SOFTWARE, owned by OMSI. It may
only be distributed to OMSI PASCAL licensees.
}

%include PAS$EXT:General.typ;

%include PAS$EXT:slen.ext;


{$NOMAIN}
{[A+,B+,L-,K+,R+] Pasmat Directive}


procedure SWrite(var f: text; {an output file, we hope}
                 var s: packed array [slow..shigh: integer] of char
  	);External;

{*USER*

Write the contents of the string variable S to the output file F.
If you are writing to the terminal, just use "output" as the file
name parameter.  A WRITE (and not writeln) is used, so you must
complete the write with a WRITELN.  The lets you do more than one
SWRITE using the same line, and also put in additional WRITES
using quoted strings.

.lit

EXAMPLE:

WRITE('Part = ');
SWRITE(output, Part_description);
WRITE('   Part number = ');
SWRITE(output, Part_number);
WRITELN;

.eli

}


Procedure Swrite;

var
  i: integer;


begin {writestring}
for i:=1 to slen(s) do write(f,s[i]);
end {writestring} ;

