- Average scripts:
This script shows how to do some number operations with ScriptFTP. You can find further help about the operations supported here.
# Set some values $a = 1 $b = 2 $c = 5 $d = "this is not a number" # Print 3 PRINT($a+$b) # Print 10 PRINT($b*$c) # Print 7 PRINT(($b+$c)/$a) # Print 14 PRINT(($b+$c)*2) # Print 5. As $d is not a number # it is considered as a zero in # every arithmetical operations. PRINT($c-$d) IF($a==1) PRINT("A is equal to 1") ELSE PRINT("A is different than 1") END IF IF($a>=1) PRINT("A is greater or equal to 1") ELSE PRINT("A is less than 1") END IF IF($a!=1) PRINT("A is different than 1") ELSE PRINT("A is not different than 1") END IF