Что не так с этим кодом php калькулятора? вроде всё правильно, а при компиляции выдаёт ошибку на 176 строке 5
namespace app\forms;
use php\gui\framework\abstractform;
use php\gui\event\uxmouseevent;
class mainform extends abstractform
{
/**
* @event button9.click-left
*/
function dobutton9clickleft(uxmouseevent $event = null)
{
$this-> edit-> text .= $event-> sender-> text;
}
/**
* @event buttonclear.click-left
*/
function dobuttonclearclickleft(uxmouseevent $event = null)
{
global $operation;
$operation = false;
$this-> edit-> text = "";
}
/**
* @event buttonsplit.click-left
*/
function dobuttonsplitclickleft(uxmouseevent $event = null)
{
global $operation;
if (! $operation){
$this-> edit-> text .= $event-> sender-> text;
$operation = $event-> sender-> text;
}
}
/**
* @event button7.click-left
*/
function dobutton7clickleft(uxmouseevent $event = null)
{
$this-> edit-> text .= $event-> sender-> text;
}
/**
* @event button8.click-left
*/
function dobutton8clickleft(uxmouseevent $event = null)
{
$this-> edit-> text .= $event-> sender-> text;
}
/**
* @event buttonmult.click-left
*/
function dobuttonmultclickleft(uxmouseevent $event = null)
{
global $operation;
if (! $operation){
$this-> edit-> text .= $event-> sender-> text;
$operation = $event-> sender-> text;
}
}
/**
* @event button4.click-left
*/
function dobutton4clickleft(uxmouseevent $event = null)
{
$this-> edit-> text .= $event-> sender-> text;
}
/**
* @event button5.click-left
*/
function dobutton5clickleft(uxmouseevent $event = null)
{
$this-> edit-> text .= $event-> sender-> text;
}
/**
* @event button6.click-left
*/
function dobutton6clickleft(uxmouseevent $event = null)
{
$this-> edit-> text .= $event-> sender-> text;
}
/**
* @event buttonmin.click-left
*/
function dobuttonminclickleft(uxmouseevent $event = null)
{
global $operation;
if (! $operation){
$this-> edit-> text .= $event-> sender-> text;
$operation = $event-> sender-> text;
}
}
/**
* @event buttonplus.click-left
*/
function dobuttonplusclickleft(uxmouseevent $event = null)
{
global $operation;
if (! $operation){
$this-> edit-> text .= $event-> sender-> text;
$operation = $event-> sender-> text;
}
}
/**
* @event button3.click-left
*/
function dobutton3clickleft(uxmouseevent $event = null)
{
$this-> edit-> text .= $event-> sender-> text;
}
/**
* @event button2.click-left
*/
function dobutton2clickleft(uxmouseevent $event = null)
{
$this-> edit-> text .= $event-> sender-> text;
}
/**
* @event button1.click-left
*/
function dobutton1clickleft(uxmouseevent $event = null)
{
$this-> edit-> text .= $event-> sender-> text;
}
/**
* @event button0.click-left
*/
function dobutton0clickleft(uxmouseevent $event = null)
{
$this-> edit-> text .= $event-> sender-> text;
}
/**
* @event buttonresult.click-left
*/
function dobuttonresultclickleft(uxmouseevent $event = null)
{
global $operation;
if ($operation){
$numbers = explode($operation, $this-> edit-> text);
switch ($operation){
case "+":
$result = $numbers[0] + $numbers[1];
break;
case "-":
$result = $numbers[0] - $numbers[1];
break;
case "×":
$result = $numbers[0] * $numbers[1];
break;
case "÷":
$result = $numbers[0] / $numbers[1];
break;
}
$this-> edit-> text = $result;
$operation = false;
}
}
для меня это !
edit: блин, пробелы строк не !