how data flows in a programm

info can be said to “flow” through a program. What is meant is that each line in the program (executed independently and sequentially) takes in previously computed (or inputed) information, modifies it or extracts more information from it and stores this information in a new variable

You can think of this as “Data builds new Data”. Data (or information) is created, stored in a variable, and then used to compute more data, which is likewise stored in new variables (or replaces the old values in old variables.

The Data Flow Pattern

// Store some original data value in a variable     variable_1 = ...; // input from user (or file, or hard coded in program);      // Use this original data to compute some new information     variable_2 = function_1 ( variable_1 );        // Use this new information to create even newer information     variable_3 = function_2 ( variable_2 );        // Use the new information to modify the original value     variable_1 = function_3 ( variable_2, variable_3 ); 

As you can see as a program steps through its sequence of instructions, each instruction will usually use “information” computed “above” to compute even more information to be used “below”. Additionally the information stored in the variables can be used to cause the program to take a different path using if statements or while loops.cya for the next blog cya

shayaanz

Ello! My name is Shayaan Ahamed and in this website we will be providing a bunch of info to all of you guys! Enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.