Flowgorithm

Flowgorithm Built-in Functions

Flowgorithm Built-in Functions

In this tutorial, we will learn Flowgorithm Built-in Functions. Built-in functions are predefined and ready to use, also known as Intrinsic Functions. We don’t need to write code for these functions; they are invoked directly in the flowcharts.

Built-in Functions

Some examples of the intrinsic functions are:

Mathematical Functions

Flowgorithm mathematical functions are as follows:

Flowgorithm Intrinsic Function Description
Log(x) The log(x) function computes the natural logarithmic of the input parameter x.
Log10(x) The log10(x) function computes the logarithmic of the base 10.
Sqrt(x) Sqrt(x) function computes the square root of the input parameter x.
Abs(x) The abs(x) function returns the absolute value of the input parameter x.
Random(n) The Random(n) function returns a random number between o and n-1.

 

Trigonometric Functions

Flowgorithm intrinsic functions are as follows:

Flowgorithm Intrinsic Function Description
Cos(x) The cos(x) function computes the cosine of the angle x. (x should be in radians.)
Sin(x)  The sin(x) function computes the sine of angle x. (x should be in radians.)
Tan(x)  The tan(x) function computes the tangent of angle x. x should be in radians.

 

String Functions

Flowgorithm string functions are as follows:

Flowgorithm Intrinsic Function Description
Len(str) The Len(str) function returns the length of the string
Char(str, index) The Char(str, index) function returns the character of the string at the index. Characters in the string are indexed starting from 0.

Other Functions

Some other functions are as follows:

Flowgorithm Function Description
Size(arr) The Size(arr) function returns the number of elements in the array arr.
EOF() The EOF() function is the end-of-file function. This returns True if the end of the input file was reached. Flowgorithm supports two modes to open a file: Read and Write. We can use this function while reading the file in the Read mode.

Data Type Conversion

Data type conversion functions like:

These functions convert the input parameters from one data type to another:

Example

Let’s use an intrinsic function sin(x) in the flowchart to understand better. Sin(x) computes the trigonometric sine of the input argument x. The input parameter x for the function should be in radians. sin(x) is a built-in function. We don’t need to define the function in the flowchart.

 

Flowgorithm Built-in Functions

User-defined Functions

Unlike built-in functions, we need to provide define and provide an implementation for the user-defined functions. We can create a user-defined function in Flowgorithm flowcharts. To know more

https://www.testingdocs.com/user-defined-functions-in-flowgorithm/

Flowgorithm Tutorials

Flowgorithm flowchart tutorials on this website: