Tutorial 1: Creating a variable
What is a variable?
A variable is something that holds a value, alphanumeric in general, used to store information, and vital in programming languages (otherwise your programming language wouldn't work very well, or would have to use another to help).
How would I go about making a variable?
You would follow these steps:
1.Bring down the console by pressing F11
2.Type a variable name, like Xvar or TX3 or Bvz
3.Type an equal sign (=)
4.Type a value, like 100 or 200 or 48 or 28 or 4.2
5.Check that you haven't made any mistakes, it should look something like: TX3 = 48
6.Press Enter
NOTE: if you are putting a variable in code, it is advisable to include a semi-colon at the end (;).
What are the input types for variables?
There are 3 input types for variables: floats, integers and strings
What's a float?
A float is a floating point number, one that has or can have a decimal point and numbers to the right of the decimal point.
What's an integer?
An integer is a number that does not have a decimal place a "whole number".
What's a string
A string is basically text, "Bam", is a string, in C++ it would be imputed like: "array Arr1 [4] = ["B","A","M",/0]" or so (I don't remember if those are the right symbols, but, essentially you get the idea), in Thyme, you don't need a terminating character, or the size of the array, strings are text, and that is how it is handled in Thyme.
No hay comentarios:
Publicar un comentario