Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>stdout() - output a string to the standard output</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     stdout() - output a string to the standard output
  Usage:    stdout([<string>])
  Params:   string <string> - null terminated string to output.
  Returns:  nothing

 ---------------------------------- Example ---------------------------------

                 CrLf = chr(13)+chr(10)
                 stdout("this string goes to stdout"+CrLf)

                 handle = fopen("temp.txt")
                 do while .not. feof(handle)
                      stdout(trim(freadline(handle))+CrLf)
                 enddo
                 fclose(handle)

            The second example will open a text file, and will read
            in a line of text at a time. The function in the loop
            will trim all trailing blanks from the line and then
            will send it to the standard console device which
            is normally the console (screen). However, if you wanted
            to redirect the output from this program into a second
            file that contains the trimmed output, you simply run the
            program using redirection. The following command line
            will pipe the output from the Clipper program into a file:

                 MYprog > trim.txt

            or to the printer:

                 MYprog > prn

  Note:     Stdout() can be used to write applications that can have their
            output redirected to other devices using the DOS > >> < |
            piping characters. stdout() does not append a cr+lf to the end
            of the string.


See Also: stdin()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson