TestingDocs.com
Software Testing website
  • JBehave
  • Selenium
  • Testlink
  • Maven
  • Git
  • RAPTOR
  • Questions

Reading a File in the RAPTOR Flowchart

Tweet
Pin it

Document Contents

  • Introduction
  • Redirect_Input
    • Redirect_Input(file)
    • Redirect_Input(False) or
    • Redirect_Input(No)
  • Example
  • Raptor Flowchart
  • Input File contents:
  • PseudoCode
  • Flowchart Output
  • (adsbygoogle = window.adsbygoogle || []).push({});
  • Writing to a file

Introduction

In this post, we will learn how to read a file in the Raptor flowchart. The standard Input flowchart symbol is used to read data from a file. The standard input to the flowchart is to prompt the user and the input is taken from the computer keyboard. We can override this behavior by Redirecting the input from the file.

Redirect_Input

To read a file in the flowchart, we have to redirect the input to the file using
the function:

Redirect_Input(file)

 

RAPTOR Flowchart Input File

After file processing we can turn off the redirection using the statement:

Redirect_Input(False) or

Redirect_Input(No)

Example

Let’s consider a sample input file that consists of the English alphabets each letter in a separate line. We will read the alphabets input file in the RAPTOR flowchart into an array and display them on to the console. At the last, we will display the count of alphabets present in the file.

Raptor Flowchart

 

Input File contents:

A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z

PseudoCode

   Public Sub Main()

      Randomize

      Dim raptor_prompt_variable_zzyz As String
      Dim file
      Dim count
      Dim ARRAYSIZE
      Dim line
      ReDim names()

      file = ""
      ARRAYSIZE = 26
      count = 1
      line = ""
      names(ARRAYSIZE) = ""
      raptor_prompt_variable_zzyz = "Enter the filename"
      file = InputBox(raptor_prompt_variable_zzyz)
      redirect_input(file)
      Do
         raptor_prompt_variable_zzyz = ""
         line = InputBox(raptor_prompt_variable_zzyz)
      Loop Until line = ""
      names(count) = line
      MsgBox names(count)
      count = count + 1
      redirect_input(false)
      MsgBox "Number of names:=" + (count - 1)
   
End Sub

 

Flowchart Output

 

Writing to a file

https://www.testingdocs.com/writing-to-a-file-with-raptor/

Related Posts

RAPTOR flowcart to write to a file output

Raptor Flowchart /

Writing to a file with RAPTOR

Raptor Flowchart /

Simulation of probabilities die roll using Raptor Flowchart

String length

Raptor Flowchart /

String Operations in Raptor Flowchart

Demo flowchart

Raptor Flowchart /

Raptor Subcharts Demo Flowchart

User input validation in Raptor flowchart

Raptor Flowchart /

User input validation in Raptor flowchart

Tag Cloud

Agile Appium Tutorials C++ Eclipse Tutorials Git Tutorials IntelliJ Tutorials Java Java Tutorial JBehave Jenkins Jira Cloud JUnit Tutorial Maven Object-oriented Flowchart Python Tutorials Raptor Flowcharts Selenium IDE TestLink Tutorials

Random Posts

  • TestLink Bitnami Cloud Image
    Overview In this tutorial, we will see the steps

    Read more

  • Code Coverage Tools
    Overview Let’s look at some of the code coverage

    Read more

  • pCloudy Continuous Testing Cloud
    Overview pCloudy is a continuous testing cloud

    Read more

Latest Tweets

Tweets by @TestingDocs

Back to Top

TestingDocs.com

Privacy Policy

Cookie Policy

  • JBehave
  • Selenium
  • Testlink
  • Maven
  • Git
  • RAPTOR
  • Questions
www.TestingDocs.com | All Rights Reserved