TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Raptor Flowchart

Write to a file with RAPTOR flowchart

Introduction

In this post, we will learn how to write to a file using the Raptor flowchart. The standard Output flowchart symbol is used to write to the file.

The standard output to the flowchart is the MasterConsole window that is displayed on the computer monitor screen. We can override this behavior by Redirecting the output to the file. This is much canonical to reading from a file.

( https://www.testingdocs.com/reading-a-file-in-the-raptor-flowchart/)

Redirect_Output

To write to a file in the flowchart, we have to redirect the output to the file using
the function:

Redirect_Output(fileName)

The function call would create a new file or overwrite an existing file with the filename. After file processing we can turn off the redirection using the statement:

Redirect_Output(False)

Flowchart Example

Let’s create a flowchart that will write two lines of output to the file using the RAPTOR flowchart application. Assume the filename is output_raptor.txt. The file would be created in the same directory to which the RAPTOR flowchart is present.

To switch the output to the file: Drag & drop a Call symbol and the below statement.

Redirect_Output(“output_raptor.txt”)

RAPTOR flowcart to write to a file output

 

All the Output flowchart symbols would write to the file instead of displaying in the MasterConsole window. Add two output statements. Save the flowchart and run the flowchart.

A new file would be created with the flowchart output.

Turn On/Off File Redirection

To Turn off the file output redirection, we can use the statement:

Redirect_Output(false)

To turn on the file output redirection, we can use the statement. This will prompt for the file during the flowchart run. Alternatively, we can append to the existing file.

Redirect_Output(true)

Append to an existing file

To append to an existing file we can use the following RAPTOR statement.

Redirect_Output_Append(“output.txt”)

This statement would open an existing file in an append mode. All the flowchart output would be appended to the file at the end. If the specified file is not present a new file would be created.

—

RAPTOR Tutorials

RAPTOR tutorials page: https://www.testingdocs.com/raptor-a-flowchart-tool/

RAPTOR official website: https://raptor.martincarlisle.com/

Related Posts

Install RAPTOR Avalonia CentOS

Raptor Flowchart /

Install RAPTOR Avalonia on CentOS

RAPTOR Avalonia Edition Windows

Raptor Flowchart /

Download RAPTOR Avalonia Edition on Windows

RAPTOR Editions

Raptor Flowchart /

RAPTOR Editions

Sum of Squares Array Elements Modular Approach

Raptor Flowchart /

Sum of Squares of Given Array Elements

Raptor Flowchart /

Simulation of probabilities die roll using Raptor Flowchart

‹ Sum of Squares of Given Array Elements› RAPTOR Editions

Recent Posts

  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version