Re: CEA - Drives
Posted: 30 Dec 2020 14:50
You're making the assumption here that I know why you've removed all the code surrounding it and/or what exactly scripting is.
This:
is nothing like this:
And I'm not talking about the two pieces of code having two completely different objectives, I'm talking about the syntax used being different. Obviously I'm missing what you're saying, which is why I stated that you are making assumptions I have a clue here! 
So... why exactly did you remove all the code surrounding
Ok, I found two examples for the same output to make things easier to understand.
This:
Is completely different from this:
Same result, different code. My point was that XY scripts resemble C++ more than PHP. Not to mention there was statement made in a forum post about VisualBasic being the scripting code, but that too is different and resembles HTML if I remember correctly.
This:
Code: Select all
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
</head>
<body>
<?php
echo "Hi, I'm a PHP script!";
?>
</body>
</html>Code: Select all
#include <iostream>
using namespace std;
int main()
{
int firstNumber, secondNumber, sumOfTwoNumbers;
cout << "Enter two integers: ";
cin >> firstNumber >> secondNumber;
// sum of two numbers in stored in variable sumOfTwoNumbers
sumOfTwoNumbers = firstNumber + secondNumber;
// Prints sum
cout << firstNumber << " + " << secondNumber << " = " << sumOfTwoNumbers;
return 0;
}So... why exactly did you remove all the code surrounding
echo "Hi, I'm a PHP script!"; in the first code section? Is that what is meant by scripting? It's a way of reducing the code required to perform actions?Ok, I found two examples for the same output to make things easier to understand.
This:
Code: Select all
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>Code: Select all
// Your First C++ Program
#include <iostream>
int main() {
std::cout << "Hello World!";
return 0;
}