*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> Tcl/puts (3)              


puts(3Tcl)							    puts(3Tcl)

NAME    [Toc]    [Back]

     puts - Write to a file

SYNOPSIS    [Toc]    [Back]

     puts ?-nonewline? ?fileId?	string

DESCRIPTION    [Toc]    [Back]

     Writes the	characters given by string to the file given by	fileId.
     FileId must have been the return value from a previous call to open, or
     it	may be stdout or stderr	to refer to one	of the standard	I/O channels;
     it	must refer to a	file that was opened for writing.  If no fileId	is
     specified then it defaults	to stdout.  Puts normally outputs a newline
     character after string, but this feature may be suppressed	by specifying
     the -nonewline switch.  Output to files is	buffered internally by Tcl;
     the flush command may be used to force buffered characters	to be output.

KEYWORDS    [Toc]    [Back]

     file, newline, output, write
PUTS(3S)							      PUTS(3S)

NAME    [Toc]    [Back]

     puts, fputs - put a string	on a stream

SYNOPSIS    [Toc]    [Back]

     #include <stdio.h>

     int puts (const char *s);

     int fputs (const char *s, FILE *stream);

DESCRIPTION    [Toc]    [Back]

     puts writes the null-terminated string pointed to by s ,followed by a
     new-line character, to the	standard output	stream stdout.

     fputs writes the null-terminated string pointed to	by s to	the named
     output stream.

     Neither function writes the terminating null character.

SEE ALSO    [Toc]    [Back]

     exit(2), lseek(2),	write(2), abort(3C), fclose(3S), ferror(3S),
     fopen(3S),	fread(3S), printf(3S), putc(3S), stdio(3S).

DIAGNOSTICS    [Toc]    [Back]

     On	success	both routines return the number	of characters written;
     otherwise they return EOF.	This will happen if the	routines try to	write
     on	a file that has	not been opened	for writing.

NOTES    [Toc]    [Back]

     puts appends a new-line character while fputs does	not.

									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
AFreadmisc IRIX read from / write to / move logical read/write pointer for data in a miscellaneous chunk in an audio file
AFclosefile IRIX close an audio file, update file header if file was opened for write access.
sat_write_filehdr IRIX write audit file header, write close time to audit file header
AFsyncfile IRIX write out a consistent snapshot of an audio file without actually closing the file
efi_fsinit HP-UX write an EFI file system header on a device file
write HP-UX write on a file
pwrite HP-UX write on a file
write IRIX write on a file
writev HP-UX write on a file
VOP_READ FreeBSD read or write a file
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service