digital literacy for everyone
/variables/ | [[input]] | [[output]] | [[basic-math]] | [[loops]] | [[conditionals]] | [[functions]]
variables are a combination of name and value. variable assignment is when a variable is created or updated with a value, such as:
height = 5
in quasi, the = is optional and most lines of code begin with a variable, except "next".
height get 5
firstname get "alan"
lastname get "patel"
as of version 4.0, the get command is typically optional for setting variables in quasi.
unlike constants, variables can have their values changed or updated:
there is little point in setting height to 5 just to set it to 6 on the next line, but sometimes a program will change the value of a variable somewhere else in the code, if you tell it to.
variables generally have type-- this refers to the kind of data (the value) they are storing. 5 is a numeric value, an integer (whole number without fraction or decimal.) 5.5 would be a "float" (number with a decimal point.) quasi treats both types as "numeric" collectively.
a value in quotes "like this" is called a string-- a string of characters. this is a value that can hold letters, numbers, punctuation and spaces-- along with a few other characters like "tab."
another variable type is the array-- while most variables associate a single name with a single piece of data, an array associates a single name with zero, one or multiple pieces of data.
setting variables is one of the 7 most important concepts in quasi, but by themselves, variables are not very useful without input, output, basic-math, loops and conditionals.
back to quasi concepts: [url]https://codeinfig.neocities.org/quasiconcepts/index.html[url]
quasi main page: [url]https://codeinfig.neocities.org/quasi/index.html[url]