Code: Select all
If (substr($RecPath,0,2) == "\\" ) { $flag=1; }
Else { $flag = exists($RecPath) ; }
If ($flag > 0) {add the path to my list;}
Code: Select all
If (substr($RecPath,0,2) == "\\" ) { $flag=1; }
Else { $flag = exists($RecPath) ; }
If ($flag > 0) {add the path to my list;}
Code: Select all
$nr = '$ind';
Global *$nr = 5;
$i = *$nr++; // wrong
$char = Substr('123456789', *$nr++, 1); // wrong
Text "i='$i', char='$char', ind='$ind'";
step;Code: Select all
$nr = '$ind';
Global *$nr = 5;
*$nr++;
$i = Eval($nr);
$char = Substr('123456789', Eval($nr), 1);
Text "i='$i', char='$char', ind='$ind'";
step;
You are IBMadmin wrote:1. Not supported.
Code: Select all
v14.30.0001 - 2014-07-11 21:46
+ Scripting: The dereference operator * (asterisk) can now be used anywhere
in a statetment.
$var = '$a'; *$var = "TEST"; echo *$var; //TEST
$var = '$a'; *$var = "TEST"; echo "*$var, $a!"; //TEST, TEST!
$var = '$a'; *$var = 1; echo 1 + *$var++; //3
! Scripting: The following kind of statement was not parsed correctly. Now
it is:
$a = 1; echo 1 + $a++; //3
$a = 1; echo $a++ + 1; //3Code: Select all
! Scripting: The following kind of statement was not parsed correctly. Now
it is:
$a = 1; echo 1 + $a++; //3
$a = 1; echo $a++ + 1; //3It's the difference between $a++ and ++$a - though since XY doesn't support the latter it is somewhat moot.klownboy wrote:I don't follow, when $a is 1, if echo $a++ yields 2 which it does, why wouldn't echo 1 + $a++ = 3 (which it does)?
Code: Select all
$a = 1; $b = $a++; $c = $a; echo "$a $b $c"; // should echo 1 1 2
$a = 1; $b = ++$a; $c = $a; echo "$a $b $c"; // should echo 1 2 2
$a = 1; $b = ++$a++; $c = $a; echo "$a $b $c"; // should echo 1 2 3Code: Select all
$a = 1;
echo $a++; // should echo 1 then set $a to 2.
echo 1 + $a++; // should echo 3 (1+2) then set $a to 3.
echo 1 + $a++ + 1; // should echo 5 (1+3+1) then set $a to 4.Damn, you are right. I checked it with PHP.TheQwerty wrote:Granted I haven't test it but this seems wrong.Code: Select all
! Scripting: The following kind of statement was not parsed correctly. Now it is: $a = 1; echo 1 + $a++; //3 $a = 1; echo $a++ + 1; //3
In every language I'm familiar with those examples would resolve $a to 1 and then increment it - so they'd echo 2 and the value of $a would become 2.
Your examples would be accurate if instead of "$a++" they were "++$a" but that's not supported.
But now you have a problem: docu says:admin wrote:Damn, you are right. I checked it with PHP.TheQwerty wrote:Granted I haven't test it but this seems wrong.Code: Select all
! Scripting: The following kind of statement was not parsed correctly. Now it is: $a = 1; echo 1 + $a++; //3 $a = 1; echo $a++ + 1; //3
In every language I'm familiar with those examples would resolve $a to 1 and then increment it - so they'd echo 2 and the value of $a would become 2.
Your examples would be accurate if instead of "$a++" they were "++$a" but that's not supported.
Back to work...![]()