Scripting Concepts Flashcards
Variables
Variables are used to store information to be referenced and manipulated in a computer program.
Variables in scripts do not have to be declared (unlike in programming languages) but can be assigned a value.
x = 1
y = 2
Strings
A string is a list of characters in a specific sequence.
“John Smith”
Comments
This is a comment
A comment is written into the code to help a human understand the initial programmer’s logic.
Constants
A constant is a named data item with a predefined value, while a variable is a named data item whose value can change during the course of program execution.
PI = 3.1415927
Environmental Variables
Environment variables are system wide and are inherited by all system processes.
Loops
Loops are a programming element that repeat a portion of code a set number of times until the desired process is complete.
Often implemented with FOR or WHILE statements.
Branch
A branch is used to control the flow within a computer program or script, usually based on some logic condition.
Often, these are implemented with IF THEN ELSE statements.