mirror of
https://github.com/Pagwin-Fedora/website.git
synced 2025-07-18 08:05:42 +00:00
idk
This commit is contained in:
parent
4c8e65e5fd
commit
f6578cd8c8
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ No this isn't comprehensive, so no you won't be able to immediately go start mak
|
||||||
If you didn't notice the asterisk in the title next to every, now you know there is one. The reason for that asterisk is that this blog only covers stuff that is common(as built in language features) in procedural programming. If you don't know what "procedural" means don't worry about it and pretend that this covers every programming language.
|
If you didn't notice the asterisk in the title next to every, now you know there is one. The reason for that asterisk is that this blog only covers stuff that is common(as built in language features) in procedural programming. If you don't know what "procedural" means don't worry about it and pretend that this covers every programming language.
|
||||||
|
|
||||||
## The Data
|
## The Data
|
||||||
Fundamentally programming is about the manipulation of data for varying purposes. On occasion a programmer will want data to be displayed which can be accomplished in many ways. For the purposes of this blog `DISPLAY(some_data)` indicates that whatever `some_data` is should be displayed. Now that data can be displayed, what data can we have? There are a few different types of data we can have<sup>[[1]](#1)</sup>. For now I'll only specify 3. Those 3 are strings, numbers and booleans. First there are strings, more commonly known as text. In many programming languages, including our pseudocode, we can create a string in our program by surrounding some text with quotes `"like this"`. Our second type is numbers which hold numbers. We can of course add, subtract, multiply, divide and raise to a power all of these numbers with the notation of `number1 + number2`, `number1 - number2`, `number1 * number2`, `number1 / number2` and `number1 ^ number2` respectively. And Last but not least we have booleans which can hold the values of `true` and `false`. Just like how we can apply different operations onto different number we also have some operations we can apply to booleans. First we have `NOT` which will take a boolean and give back the opposite boolean e.g. true → false and false → true. Second we have `OR` which takes 2 booleans and gives back true if either of them are true and false otherwise. Third we have `AND` which takes 2 booleans and gives back true only if both of them are true and false otherwise. Finally we have `XOR` which will only give back true if only 1 of it's inputs is true eg `true XOR true` → false and `false XOR false` → false but `true XOR false` → true.
|
Fundamentally programming is about the manipulation of data for varying purposes. On occasion a programmer will want data to be displayed which can be accomplished in many ways. For the purposes of this blog `DISPLAY(some_data)` indicates that whatever `some_data` is should be displayed. Now that data can be displayed, what data can we have? There are a few different types of data we can have<sup>[[1]](#1)</sup>. For now I'll only specify 3. Those 3 are strings, numbers and booleans. First there are strings, more commonly known as text. In many programming languages, including our pseudocode, we can create a string in our program by surrounding some text with quotes `"like this"`. Our second type is numbers which hold numbers. We can of course add, subtract, multiply, divide and raise to a power all of these numbers with the notation of `number1 + number2`, `number1 - number2`, `number1 * number2`, `number1 / number2` and `number1 ^ number2` respectively. Last but not least we have booleans which can hold the values of `true` and `false`. Just like how we can apply different operations onto different number we also have some operations we can apply to booleans. First we have `NOT` which will take a boolean and give back the opposite boolean e.g. true → false and false → true. Second we have `OR` which takes 2 booleans and gives back true if either of them are true and false otherwise. Third we have `AND` which takes 2 booleans and gives back true only if both of them are true and false otherwise. Finally we have `XOR` which will only give back true if only 1 of it's inputs is true eg `true XOR true` → false and `false XOR false` → false but `true XOR false` → true.
|
||||||
|
|
||||||
## Variables
|
## Variables
|
||||||
Variables allow for the storage of data in named<sup>[[2]](#2)</sup> buckets which is very useful especially when taking input that can change at runtime. We can put a value into a variable like so `someVar ← "a string"` which would set the variable someVar to the string value of "a string".
|
Variables allow for the storage of data in named<sup>[[2]](#2)</sup> buckets which is very useful especially when taking input that can change at runtime. We can put a value into a variable like so `someVar ← "a string"` which would set the variable someVar to the string value of "a string".
|
||||||
|
@ -69,7 +69,7 @@ FOREACH n <- dataSet {
|
||||||
DISPLAY(n)
|
DISPLAY(n)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
##Conclusion
|
## Conclusion
|
||||||
That should cover the basic syntax features someone trying to learn a procedural programming langauge should be trying to learn. Some programming languages have macros, terenary statements and extensive standard libraries which will have a bunch of useful utilities those are best learned once these basic syntax features are understood and different langauges tend to differ regarding what and whether these features are include
|
That should cover the basic syntax features someone trying to learn a procedural programming langauge should be trying to learn. Some programming languages have macros, terenary statements and extensive standard libraries which will have a bunch of useful utilities those are best learned once these basic syntax features are understood and different langauges tend to differ regarding what and whether these features are include
|
||||||
|
|
||||||
## Footnotes
|
## Footnotes
|
||||||
|
|
Loading…
Reference in a new issue