PSeInt SubAlgoritmo: another name for SubProceso
Another name for SubProceso: groups instructions under a name to reuse them. It works exactly the same.
- Group:
- Structures
- Template
SubAlgoritmo
Opens the editor with this example loaded. Run it step by step and watch the flowchart.
Worked example
A complete algorithm, ready to copy and run.
SubAlgoritmo Linea() Escribir "----------"FinSubAlgoritmoAlgoritmo Example Linea() Linea()FinAlgoritmoOutput
Every call to Linea() draws a line.
This is what the console shows when the example runs.
--------------------
In a flowchart
This is how it appears in a flowchart, with the same shapes Codoritmo draws.
Template
The general form. Replace what's inside < > with your own data.
SubAlgoritmo Nombre(<parametro>) <acciones>FinSubAlgoritmoExamples that use it
Programs from the example library where it appears, from the simplest to the most complete.
Bubble Sort
Sorts random numbers by swapping neighbors, and stops as soon as they're in order.
IntermediateSelection Sort
Finds the smallest of the remaining numbers and puts it in its place.
IntermediateInsertion Sort
Inserts each number among the sorted ones, like arranging cards in your hand.
IntermediateCounting Sort
Counts how many times each value appears, without comparing numbers.
IntermediateBinary Search
Finds a value in a sorted array by halving the range every step.
IntermediateLinear vs. Binary Search
Counts the comparisons each search needs on the same sorted list.
Intermediate
More structures
Codoritmo is an independent, open-source project inspired by PSeInt and compatible with its syntax. It is not affiliated with the PSeInt project. Official PSeInt website.